Skip to content

Add the CSP bypass to the mitigation bounty #16321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tomrittervg
Copy link
Contributor

@mozfreddyb @evilpie Is this good? I want the bypass to have minimal requirements but I'm not sure if phrased as-is, there are known bypasses we haven't fixed yet.

I'm envisioning a valid submission to be like:

In <file> I can get a reference to the browser and do 
x = document.createElement('script')
x.innerHTML = "alert(1)"
document.getElementById('whatever').appendChild(x)
and it will trigger, here's a screenshot.

Would our CSP protect against that? If not how would we change this description to be accurate but expansive.

@tomrittervg tomrittervg requested a review from a team as a code owner June 6, 2025 14:01
@evilpie
Copy link

evilpie commented Jun 10, 2025

I don't think we need to limit this to inline script execution, but script execution that bypasses the CSP in general. Executing code that is permitted by the CSP anyway (e.g. loading a random file from chrome:) isn't particularly interesting unless the reporter finds a file that enables them to escape the sandbox.

I thought we had talked about also paying a small bounty for demonstrating cases where script execution would have been possible without a CSP. Is that something we would consider?

@mozfreddyb
Copy link
Contributor

I believe we should consider both:

  • CSP bypass that would lead to a sandbox escape if there was an XSS
  • An "almost XSS" in a message that is sent from child to parent is only mitigated by the CSP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants