You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue proposes adding the base-uri directive to our Content Security Policy (CSP) to enhance security by controlling the base URL used for resolving relative URLs in our web application. The base-uri directive restricts where <base> elements can point, helping mitigate certain types of injection attacks and preventing the unintended manipulation of relative URL resolution.
Why Add base-uri?
Mitigates Injection Attacks:
Attackers may attempt to inject a malicious <base> element into the HTML document, redirecting relative URLs (e.g., links, resources) to an unauthorized or malicious domain.
Improves Application Integrity:
Ensures that all relative URLs resolve to trusted origins, maintaining control over URL resolution behavior.
Protects user experience and data by preventing exploitation of relative links.
Aligns with Security Best Practices:
Adding base-uri to CSP strengthens the policy against attacks targeting URL resolution, complementing other directives like script-src and form-action.
The text was updated successfully, but these errors were encountered:
There don't seem to be any <base> elements set visibly from a quick search, and I also don't recall any env settings to inject it for some deployments (e.g. don't see it being used even in test.bedrock.nonprod.webservices.*) so the goal is perhaps to set it to 'none', right?
The public facing site should be fine, question is whether Wagtail doesn't need that for anything, but the only base use I can spot is in targets for opening new windows, so a RO test-drive should surface any violations, but hopefully there would be none. 🤞
Description
This issue proposes adding the
base-uri
directive to our Content Security Policy (CSP) to enhance security by controlling the base URL used for resolving relative URLs in our web application. Thebase-uri
directive restricts where<base>
elements can point, helping mitigate certain types of injection attacks and preventing the unintended manipulation of relative URL resolution.Why Add
base-uri
?Mitigates Injection Attacks:
<base>
element into the HTML document, redirecting relative URLs (e.g., links, resources) to an unauthorized or malicious domain.Improves Application Integrity:
Aligns with Security Best Practices:
base-uri
to CSP strengthens the policy against attacks targeting URL resolution, complementing other directives likescript-src
andform-action
.The text was updated successfully, but these errors were encountered: