Skip to content
XSS Disclosed report Intermediate

Bypassing Content-Security-Policy leads to open-redirect and iframe xss

The Content-Security-Policy frame-src directive allowed any subdomain of firebaseapp.com, a free hosting service, so an attacker could embed their own page in an iframe inside the template editor. This enabled iframe injection, popup-based redirects and phishing against users of the same organisation.

echidonut Follow

Originally disclosed on HackerOne

  • Triaged in 4 days
  • Fixed in 3 months
  • Disclosed after 3 months

Summary by the researcher

CSP includes *.firebaseapp.com , instead of just stripo-app.firebaseapp.com therefore allowing any users to include their own iframe by hosting it on google firebase

correction: There is no such thing as iframe xss, this should be iframe injection :))

The report

Summary:

https://my.stripo.email/cabinet/#/template-editor/..... has the ff: code to make iframes more secure:

HTML
<meta http-equiv="Content-Security-Policy" content="default-src 'self';
    frame-src data: *.firebaseapp.com *.stripe.com *.google.com *.facebook.com 'self';
    style-src 'self' 'unsafe-inline' *;
    script-src 'self' 'unsafe-eval' 'unsafe-inline' *.ampproject.org googletagmanager.com *.googletagmanager.com *.amplitude.com api.vk.com *.gstatic.com *.facebook.net *.google.com *.google-analytics.com *.stripe.com *.pingdom.net *.intercom.io *.intercomcdn.com *.stripo.email *.zscalertwo.net *.zscaler.com *.zscaler.net *.pinimg.com *.getsitecontrol.com;
    img-src 'self' data: *;
    connect-src 'self' *;
    child-src blob:;
    font-src 'self' *;
    object-src 'self' *">
  • <iframe> pointing to other domains won't work but, the whitelist in frame-src data has listed *.firebaseapp.com, a free hosting domain, leading to iframe abuse and redirects

Steps To Reproduce:

  1. Create a new message/template with HTML
  2. Using nodeJS, deploy a page in firebaseapp. It's free. Guide
  3. Mine is hackerone-jm.firebaseapp.com. Add the ff. line: <iframe src="//hackerone-jm.firebaseapp.com"></iframe> in the HTML editor
  4. A browser popup will show, then redirect after

Supporting Material/References:

recording-1618597510622.webm From the original on HackerOne

Tested in Google Chrome Version 89.0.4389.128 (Official Build) (64-bit)

Impact

  • This can be used to launch a phishing attack against users of the same organization.
  • viewstripo.email is also vulnerable to this making it an open redirect/xss to all users. POC
  • This also makes editing the message/template almost impossible without disabling javascript in your browser

this only works assuming the user has allowed my.stripo.email to redirect and spawn popups.

The original report as published on HackerOne, by echidonut. 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

Root cause

The frame-src allowlist used a wildcard for the whole firebaseapp.com domain instead of the single specific project subdomain.

Impact

The issue could be used for phishing against users of the same organisation and as an open redirect or injection affecting all users, though it only works if the user has allowed the site to redirect and spawn popups.

What the attacker needed

Victim opens the crafted template; browser allows popups and redirects; attacker hosts a free firebase page

How it was found

  1. Create a new message or template with HTML.
  2. Deploy a page on the free firebaseapp hosting service.
  3. Insert an iframe pointing at that hosted page in the HTML editor.
  4. Open the editor and observe the popup and redirect.

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.

A Content-Security-Policy is a list of rules a website gives the browser about which other sites it may load content from. Here the rule for frames allowed every site ending in firebaseapp.com, and anyone can host a free page there. So an attacker could put their own page inside the editor and use it to redirect or trick users.

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 echidonut

View all

1 more disclosed report, best first.

More from Stripo Inc

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.