webzod
account

Add base-uri to the Content-Security-Policy

headers.csp.base_uri · effort: minutes

Why it matters

An injected base tag can make every relative script URL on the page load from an attacker's server. base-uri 'self' (or 'none') stops that and almost never breaks anything.

The fix

  1. Add base-uri 'self' to the policy ('none' if your pages have no base tag).
  2. If your pages use a base tag pointing at another origin, list that origin instead.
http
Content-Security-Policy: <your current policy>; base-uri 'self'

Read the documentation (opens in a new tab)

Scan your domain to see whether this applies to you.