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
As noticed here, since CSP sources match against the URL to be loaded and not against the origin, and since about:blank is always allowed by CSP, Content-Security-Policy: frame-src 'self' does not prevent child frames of the current document to have different origins than the document itself. For example, in the frame tree 1.A > 2.B > 3.B with origins A and B, the top-level A can always navigate the grandchild to about:blank, making it have origin A and resulting into the frame tree 1.A > 2.B > 3.A, even if 2.B comes with CSP: frame-src 'self'.
This might be surprising to web developers, who might assume in their security model that this would never happen. I wonder if it's something we'd want to change.
The text was updated successfully, but these errors were encountered:
As noticed here, since CSP sources match against the URL to be loaded and not against the origin, and since
about:blank
is always allowed by CSP,Content-Security-Policy: frame-src 'self'
does not prevent child frames of the current document to have different origins than the document itself. For example, in the frame tree1.A > 2.B > 3.B
with originsA
andB
, the top-levelA
can always navigate the grandchild toabout:blank
, making it have originA
and resulting into the frame tree1.A > 2.B > 3.A
, even if2.B
comes withCSP: frame-src 'self'
.This might be surprising to web developers, who might assume in their security model that this would never happen. I wonder if it's something we'd want to change.
The text was updated successfully, but these errors were encountered: