Skip to content
CORS Write-up Intermediate

Breaking Into a Major Email Platform With Two Vulnerabilities

The platform's API reflected any supplied Origin header in its CORS response while also allowing credentials, so a malicious page could read authenticated data from a logged-in user's account. Separately, a decommissioned staging subdomain still had active DNS delegation to an empty cloud hosted zone, which could allow someone to claim it and host content under the trusted domain.

medium.com

Published on medium.com

This is a technical write-up of two security vulnerabilities I found while doing bug bounty research on a major email delivery platform — the kind of platform that businesses use to send millions of emails to their customers every day.

Prateekpulastya, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

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

How it worked

Root cause

Likely the API echoed whatever Origin the client sent back in the CORS allow header together with a credentials flag, instead of checking the origin against a fixed allowlist.

Impact

An attacker could read a logged-in user's profile, API keys and contact lists from any website the user visited, and the stolen keys could persist after the session ended; the subdomain takeover was closed as informative because actual DNS control was not demonstrated.

What the attacker needed

Victim logged in; victim visits attacker page; cookie readable by JavaScript

The fix

The CORS response should only echo origins from an explicit allowlist and return no allow-origin header otherwise; the text does not say whether this was fixed.

How it was found

  1. Read the public JavaScript bundle to see how the session cookie is stored and sent.
  2. Send a preflight request to an API endpoint with a foreign Origin header.
  3. Observe that the response reflects that origin and allows credentials.
  4. Run a script from the browser console while logged in to fetch profile, API keys and contacts cross-origin.
  5. Confirm the API returned authenticated data to the foreign origin.

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 write-up has not been written yet. The Original tab links to the source.

When you log into a site, your browser holds a cookie that proves who you are. A rule called CORS decides whether another website is allowed to ask that site for your data using your cookie. Here the site said yes to every website, so any page you visited could quietly read your profile, API keys and contacts.

What is CORS?

A permissive cross-origin policy lets another site read responses with the user's credentials.

Similar reports

View all

Same bug class and techniques, clearest first.

CORS misconfiguration

The lesson behind this report.

A permissive cross-origin policy lets another site read responses with the user's credentials.