Skip to content
XSS Disclosed report Intermediate

HTML Injection / Reflected Cross-Site Scripting with CSP on https://accounts.firefox.com/settings

The flowId parameter on the Firefox accounts settings page was reflected into the HTML response without escaping, allowing an attacker to inject markup. Because the site's Content-Security-Policy blocked inline script, the reporter demonstrated script-less attacks such as an open redirect and a fake download prompt rather than JavaScript execution.

clsn Follow

Originally disclosed on HackerOne

Bounty$1,000 Medium 5.0 View original
  • Triaged in 26 hours
  • Fixed in 9 days
  • Paid in 13 days
  • Disclosed after 42 days

Summary:

Good morning,

There is a vulnerability on accounts.firefox.com, where the flowId parameter is reflected into the server response without being escaped for HTML. This causes a Cross-Site Scripting attack, which may allow attackers to take over accounts. To do that, one would need to bypass the Content-Security-Policy on Firefox's website, which looks like this:

HTTP
Content-Security-Policy: connect-src 'self' https://api.accounts.firefox.com https://graphql.accounts.firefox.com https://oauth.accounts.firefox.com https://profile.accounts.firefox.com wss://channelserver.services.mozilla.com https://channelserver.services.mozilla.com https://*.sentry.io http://localhost:4318;default-src 'self';form-action 'self' https://accounts.google.com https://appleid.apple.com;font-src 'self' https://accounts-static.cdn.mozilla.net;frame-src 'none';img-src 'self' blob: data: https://secure.gravatar.com https://firefoxusercontent.com https://profile.accounts.firefox.com https://accounts-static.cdn.mozilla.net;media-src blob:;object-src 'none';report-uri /_/csp-violation;script-src 'self' https://accounts-static.cdn.mozilla.net;style-src 'self' https://accounts-static.cdn.mozilla.net;base-uri 'self';frame-ancestors 'self';script-src-attr 'none';upgrade-insecure-requests

Bypassing the Content-Security-Policy was not done yet, and I am not sure if its even doable. Therefore I am reporting the vulnerability as is because even without Javascript execution there are some attacks that are still possible script-less. One theoretical attack that could be possible is using the connect-src directive to make requests to the http://localhost:4318 URL and then possibly leak traces or other sensitive data from OpenTelemetry Collector (making Mozilla employees possibly a target for this attack).

PoCs

  1. Open Redirect

https://accounts.firefox.com/settings?deviceId=cc10a15a5ac94bdf8a9a0bc5b2912520&flowBeginTime=1676972087857&flowId=%22%3E%3Cmeta%20http-equiv=%22refresh%22%20content=%221;%20http://example.com%22%3E&broker=web&context=web&isSampledUser=false&service=none&uniqueUserId=dbf23f86-d3d1-4576-92bc-ebaa4fd14795

  1. UI Redressing

https://accounts.firefox.com/settings?deviceId=cc10a15a5ac94bdf8a9a0bc5b2912520&flowBeginTime=1676972087857&flowId=e587d1d6ceb%22%3E%3Ch1%3EYour+machine+needs+to+be+analyzed.+Please+download+and+run+this+file+to+continue%3a+%3Ca+href%3d%22http%3a//evil.tld/a.exe%22%3EClick%20here%20to%20Download%3C/a%3E%3C/h1%3E%3C!--&broker=web&context=web&isSampledUser=false&service=none&uniqueUserId=dbf23f86-d3d1-4576-92bc-ebaa4fd14795

Impact

An attacker can inject HTML on the page and potentially run attacks involving user interaction, with achieving arbitrary javascript code execution not being possible due to the Content Security Policy installed on the server.

The original report as published on HackerOne, by clsn. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

An attacker could inject HTML to run user-interaction attacks such as redirects or fake download prompts, but arbitrary JavaScript execution was not achieved because the Content-Security-Policy blocked it.

How it was found

  1. Open the settings page with a crafted flowId value in the URL.
  2. The server reflects that value into the HTML response unescaped.
  3. The injected markup renders in the page, producing an open redirect or a fake download prompt.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When a website puts something you typed into the page without cleaning it first, an attacker can slip in their own HTML, the language web pages are built from. Here the site's security policy stopped the attacker from running JavaScript, the code that would let them steal accounts, but they could still change what the page shows and where it sends you.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by clsn

View all

3 more disclosed reports, best first.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.