Skip to content
XSS Write-up Beginner

API Hacking on Mercedes-Benz

A Swagger UI page on a Mercedes-Benz subdomain accepted a configUrl parameter that loaded a remote configuration file, letting an attacker control part of the page and trigger reflected cross-site scripting. An attacker could run script in the context of the affected subdomain when a victim opened a crafted link.

medium.com

Published on medium.com

After spending a long time hunting bugs on Paytm, I honestly started feeling a bit bored. So, I decided to switch things up and randomly picked a new target — Mercedes-Benz — without even checking their vulnerability disclosure policy at first. �

SIDDHANT SHUKLA, 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 Swagger UI configUrl parameter was not restricted to trusted origins, so a remote configuration could inject script into the page.

Impact

An attacker could run script in the context of the affected subdomain when a victim opened a crafted link, though the text gives no further detail on what that script could reach.

What the attacker needed

Victim clicks a crafted link; attacker-hosted config file

The fix

The report says the issue was fixed after responsible disclosure, though it does not describe the change.

How it was found

  1. Find a Mercedes-Benz subdomain running Swagger UI through Google dorks.
  2. Try a configUrl parameter pointing to an external test file on the first subdomain; no script fires.
  3. Use Burp Suite to watch background API calls and find another Swagger UI endpoint.
  4. Send the same configUrl parameter to the new subdomain and observe the script execute.

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.

Swagger UI is a page that documents and tests an API. It can be told to load its settings from another address through a URL parameter. Here the site did not check where that address pointed, so a page from an attacker's server was loaded and its script ran inside the Mercedes-Benz site.

What is XSS?

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

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.