Course
Secure Frontend Engineering
Every client-side trust boundary — DOM sinks, sanitizers, Trusted Types, CSP, the script supply chain, and cross-window messaging — explained by mechanism and hardened into concrete practice.
Keep reading
Related articles from the SudoSecurity blog.
They Got Root on a Fully Patched Ivanti VPN and the Integrity Checker Said Everything Was Fine
Volexity caught an attacker chaining zero-days into unauthenticated root on an Ivanti Connect Secure appliance running the latest build. The payload never touched disk, commands rode in over the same HTTPS requests as the exploit, and Ivanti's Integrity Checker reported no modifications.
Gitea Shipped 21 CVEs in One Release and Eleven of Them Are the Same Bug
Gitea 28.3.0 landed November 1 with twenty-one CVE fixes. Read the list and a pattern jumps out: more than half are the same failure repeated across different route handlers, where a token scoped to public data gets handed private data anyway. That's not twenty-one mistakes.
php2shell: The PHP Bug That Fires Before Your Code Runs
Two critical PHP flaws landed October 21 and were in CISA's exploited-vulnerabilities catalog five days later. The 9.2 score isn't the part that should bother you. It's where the bug lives — it goes off while PHP is still assembling $_POST, before a single line of your application has run.
A Certificate Authority's Private Keys Were the Numbers 4, 56 and 66
Eight eMudhra intermediate CA keys turned out to be recoverable from their own public certificates. Not stolen — computable, because the key generation produced almost no entropy. A researcher pulled all eight in under a second and signed a message with each one to prove it.
Reviews
Enrolled members can rate this course.
No reviews yet.
XSS: How Strings Become Code
Every DOM sink that parses attacker input, the three delivery paths, framework escape hatches, and DOM clobbering.
- 01The Sinks That ExecuteinnerHTML, document.write, eval, javascript: URLs, srcdoc, and setAttribute handlers — every API that turns a string into live code, and the grep list for auditing them.14mOpen
- 02Reflected, Stored, and DOM-Based XSSHow the payload arrives defines the bug class: reflected rides the request, stored waits in the database for admins, and DOM XSS never crosses your perimeter at all.15mOpen
- 03Framework Escape HatchesReact's dangerouslySetInnerHTML and unfiltered href schemes, Vue v-html, Angular's bypassSecurityTrust* calls, and jQuery's script-executing parseHTML.13mOpen
- 04DOM ClobberingInjected id and name attributes shadow globals your JS reads — how AMP4Email in Gmail fell to markup that contained no script at all.12mOpen
Sanitization and Trusted Types
Why sanitizers must parse rather than pattern-match, mutation XSS, and Trusted Types enforcement at the sink.
- 01Sanitizers and Mutation XSSSanitization is a parse-transform-serialize pipeline, and mutation XSS lives in the gap between your sanitizer's parse and the browser's re-parse.13mOpen
- 02Trusted Typesrequire-trusted-types-for 'script' makes every DOM sink reject plain strings; policies mint TrustedHTML through DOMPurify, and the 'default' policy quietly undoes enforcement.13mOpen
Content Security Policy
Building a deny-by-default CSP with nonces and strict-dynamic, deploying it via report-only, and the bypasses that still work.
- 01A CSP That Actually Blocks ThingsThe deny-by-default policy with nonces, strict-dynamic, base-uri, and form-action — and why script-src 'self' 'unsafe-inline' protects nothing.14mOpen
- 02Nonces, Hashes, and strict-dynamicPer-response nonce plumbing through middleware, why strict-dynamic makes host allowlists optional, and report-driven rollout.13mOpen
- 03CSP Bypasses and What It Can't StopJSONP endpoints and script gadgets on allowed hosts, path collapse on redirects, missing base-uri and form-action directives, and the attacks CSP never governed.13mOpen
The Client-Side Supply Chain
Third-party script privileges, Subresource Integrity pinning, and npm lifecycle scripts and lockfile integrity.
- 01Third-Party Scripts Are Remote CodeA script tag hands your origin to a remote operator — polyfill.io's 2024 sale and the Magecart skimming of British Airways as the evidence.12mOpen
- 02Subresource IntegrityThe integrity attribute pins the bytes a fetched file must match — how to generate hashes, the CORS requirement, and why mutable endpoints can't be pinned.11mOpen
- 03npm and the Lockfilenpm install executes lifecycle scripts before your app builds; the lockfile pins resolved URLs and sha512 hashes — event-stream, Ledger Connect Kit, and dependency confusion as the threat model.13mOpen
Boundaries Between Windows
postMessage origin and source validation, iframe sandbox tokens, clickjacking defenses, and COOP/COEP isolation.
- 01postMessage BoundariesSender-side targetOrigin, receiver-side exact origin matching, why substring checks fail, and event.data as an untrusted source feeding DOM sinks.12mOpen
- 02iframes, sandbox, and ClickjackingThe sandbox attribute's capability tokens, the allow-same-origin plus allow-scripts escape, frame-ancestors as the real anti-framing control, and COOP/COEP isolation.13mOpen