Software Securityhome
Fix a findingSearch
Tag

Browser security

9 guides tagged Browser security, grouped by topic, with the SDLC phase and role each is written for.

SDLC phases
Roles

Application security

6 guides
Guide · Application security

Prevent XSS at the output boundary

Choose text rendering, context-aware encoding, or deliberate HTML sanitization according to how the browser will interpret the value.

Development · Developers

Guide · Application security

Protect cookie-authenticated actions against CSRF

Make the server distinguish an intended action from a request another site caused the browser to send.

Development · Developers, AppSec engineers

Guide · Application security

Configure CORS and CSP around the browser capabilities you need

Control who can read API responses and which resources a page may execute without confusing either control with authorization.

Development · Developers, AppSec engineers

Guide · Application security

Render rich text without granting it application privileges

Choose text rendering or a restricted HTML policy, then test the final DOM after every transformation.

Development · Developers, AppSec engineers

Guide · Application security

Prevent DOM XSS, postMessage abuse and client-side injection

Trace attacker-controlled values from the URL, messages and storage to the browser APIs that parse HTML or run code, then close those sinks with safe APIs, a sanitizer, Trusted Types and strict message checks.

Development · Developers, AppSec engineers

Guide · Application security

Configure HTTP security headers from a tested baseline

Send the response headers that make browsers enforce HTTPS, run only your own scripts, refuse hostile framing and keep cookies on one host, then prove they appear on every kind of response.

Development · Developers

Software supply chain

1 guide

Runtime, cloud & APIs

1 guide

Identity & cryptography

1 guide

Practice

Browser lab · Foundation · 20–30 min

CSRF lab: Protect an account change from a forged request

An account settings handler trusts the session cookie even when another site causes the request. Repair the request policy and preserve legitimate settings updates.

Browser lab · Foundation · 20–30 min

XSS lab: Render a model’s answer as text instead of active markup

A report page shows generated answers with a link to the cited source. The renderer inserts both as HTML, so an answer containing an image handler becomes active markup and a javascript: source becomes a clickable script. Repair the text serializer and the DOM renderer.

Browser lab · Foundation · 20–30 min

CORS policy lab: Grant CORS to the right origins only

An API reflects whatever Origin a request carries and allows credentials, so any website can read a signed-in user’s data from it. Repair the CORS policy so it grants access only to the configured origins and keeps caches correct.

Browser lab · Practitioner · 25–40 min

CSP builder lab: Build a strict Content-Security-Policy

A page sends a Content-Security-Policy whose script-src allows any HTTPS origin, so an injected external script runs despite the nonce. Repair the builder so it produces a strict nonce-based policy from the document’s declared needs.

Browser lab · Practitioner · 25–40 min

HTML sanitization lab: Configure a sanitizer for user comments

A comment feature keeps the formatting users submit, but its sanitizer configuration re-enables event handlers, unknown URL schemes and extra tags, so a comment can run script. Repair the configuration so only a small set of formatting tags and safe links survive.

Fix card · CWE-352

Cross-site request forgery (CSRF)

Cross-site request forgery happens when a server accepts a state-changing request because it carries the user's session cookie.

Fix card · CWE-942, CWE-346

CORS misconfiguration on credentialed APIs

A CORS misconfiguration lets a page on another origin read an API's responses with the user's cookies.

Fix card · CWE-1021

Clickjacking

Clickjacking (a UI redress attack) happens when a sensitive page can be loaded in a frame by another site, which overlays a decoy so a victim's click lands on the real control.

All tags, lifecycle stages and roles

Find your next answer

Type to search. Search runs in your browser.

Searches run in your browser, but the host can infer them from the index files they load. The address shows your search so you can bookmark or share it.