Skip to content
Info disclosure Write-up Intermediate

404 to 0wnage: How a Broken API Route Unlocked Production Secrets

An unauthenticated internal API endpoint on a development subdomain returned production secrets, including AWS keys and a JWT signing secret, despite returning a 404 status. An attacker could use these credentials to gain full AWS access and forge admin tokens for the internal portal.

iski Follow

Published on infosecwriteups.com

Free Link🎈

Iski, on infosecwriteups.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 internal API routes were not properly removed from the backend and were protected only by a misleading 404 response instead of proper authentication.

Impact

The leaked credentials provided full AWS access, allowed SMTP spoofing, and enabled forging admin tokens to access the internal portal without 2FA.

What the attacker needed

Unauthenticated access to the subdomain; knowledge of the internal API path

How it was found

  1. Discovered an unauthenticated subdomain and probed common API paths, all returning 404.
  2. Noticed one path returned a 404 with a delay, indicating the endpoint existed.
  3. Used ffuf to fuzz the internal path and found endpoints like /env, /secrets, and /creds.
  4. Requested the /secrets endpoint and received AWS keys, JWT secret, and SMTP credentials.
  5. Validated AWS access and found full admin privileges.
  6. Forged a JWT admin token using the leaked secret and accessed the internal dashboard.

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.

A company left a secret web address (an API endpoint) open to anyone on the internet, even though it was supposed to be removed. That address gave away passwords and keys for their cloud services. With those keys, an attacker could take control of their systems.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by iski

View all

186 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.