Skip to content
Subdomain takeover Disclosed report Intermediate

Subdomain Takeover at qsurvey.mozilla.com

A subdomain takeover was possible on qsurvey.mozilla.com because SurveyGizmo's /s3/ endpoint accepted a __slug parameter that allowed loading arbitrary survey content from other domains. An attacker could host malicious content on their own survey and make it appear under the Mozilla subdomain, enabling phishing and credential theft.

ak1t4 Follow

Originally disclosed on Mozilla

  • Fixed in 11 days
  • Paid in 22 days
  • Disclosed after 11 days
Text
Created attachment 8925405
Captura de pantalla 2017-11-05 a la(s) 22.00.03.png

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/604.3.5 (KHTML, like Gecko) Version/11.0.1 Safari/604.3.5

Steps to reproduce:

Hi team, i found an issue who permit takeover qsurvey.mozilla.com


Subdomain Takeover PoC link:

http://qsurvey.mozilla.com/s3/akita-takeover.html?__slug=sgiz.mobi%2fs3%2Ftko



curl -Lv http://qsurvey.mozilla.com/s3/akita-takeover.html?__slug=sgiz.mobi%2fs3%2ftko

*   Trying 54.208.81.3...
* TCP_NODELAY set
* Connected to qsurvey.mozilla.com (54.208.81.3) port 80 (#0)
> GET /s3/akita-takeover.html?__slug=sgiz.mobi%2fs3%2ftko HTTP/1.1
..

< HTTP/1.1 200 OK
< Date: Sun, 05 Nov 2017 02:24:39 GMT
< Server: Apache
..


Description:


SurveyGizmo creates all surveys links under /s3/ path with default domains like www.surveygizmo.com and sgizmo.com, the application has a feature which permit branded domains and private domains. 

This feature is over https://app.surveygizmo.com/account/domains:

Account -> Domains -> New Private domain -> yourdomain.com -> save.

If you want to add a private domain which is 'already claimed', the application reply with a "This domain name is already in use."

This bug bypass the security of using a unique already claimed domain and permit use any SG customers private domains as owner with any arbitrary content injection.

Doing a deep research & recon on the application backend, I found a vulnerable endpoint which is not sanitized under path [ /s3/? ] with a callback param [ __slug= ] who permit inject any survey/content using any SG private customers domain managed by their Dns.

Actual DNS entry on qsurvey.mozilla.com:

qsurvey.mozilla.com is an alias for privatedomain.sgizmo.com.
privatedomain.sgizmo.com is an alias for www.sg53.net.
www.sg53.net has address 54.208.81.3


Domain + Vulnerable endpoint path + callback param: 

http://[domain]/s3/string.html?__slug=evil-content-survey


Reproduction Steps & PoC:

1) Create a normal survey on Surveygizmo with default domains (www.surveygizmo.com or sgiz.mobi) like example: http://sgiz.mobi/s3/tko [this content have too an alert(document.domain) as PoC execution.]

2) Then inject the above url-survey in the callback param on the vulnerable endpoint using qsurvey.mozilla.com domain:

http://qsurvey.mozilla.com/s3/akita-takeover.html?__slug=url-survey-here

http://qsurvey.mozilla.com/s3/akita-takeover.html?__slug=sgiz.mobi/s3/tko

(Now you can see the subdomain takeover and the alert(document.domain) popup over qsurvey.mozilla.com)

(screenshot attached)


Security Impact

An attacker can utilize this bug for targeting mozilla Users by fake login forms, spread phishing, steal sensitive Users information (accounts, steal credentials, cookies, credit card information, etc) over qsurvey.mozilla.com.

FIX & MITIGATION on SG:

Remove callback param on private domains and do the proper sanitizing on /s3/? endpoint.
-


Let me know if you need anything else about this,

Kind regards,
@ak1t4

The original report as published on Mozilla's Bugzilla, by ak1t4. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

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

Likely the /s3/ endpoint failed to validate the __slug parameter, allowing it to reference surveys on other domains and bypass the private domain ownership check.

Impact

An attacker could use the takeover to host fake login forms, spread phishing, and steal sensitive user information such as credentials and cookies from Mozilla users.

What the attacker needed

SurveyGizmo account to create a survey; Victim visits the crafted URL

The fix

The callback parameter should be removed from private domains and the /s3/ endpoint should be properly sanitised.

How it was found

  1. Create a normal survey on SurveyGizmo using a default domain.
  2. Inject the survey URL into the __slug parameter of the vulnerable endpoint on qsurvey.mozilla.com.
  3. Observe the subdomain takeover and the alert(document.domain) popup.

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 subdomain takeover happens when a company points a subdomain to an external service but forgets to remove the DNS record after the service is no longer used. Here, the external survey service had a flaw that let anyone load their own content through a special URL parameter, so the Mozilla subdomain could show attacker-controlled pages. This could trick users into entering passwords on a fake login page that looks like it belongs to Mozilla.

What is Subdomain takeover?

A company's DNS still points at a cloud service it no longer uses, so anyone can claim it and serve content on the company's domain.

More by ak1t4

View all

17 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.

Subdomain takeover

The lesson behind this report.

A company's DNS still points at a cloud service it no longer uses, so anyone can claim it and serve content on the company's domain.