Skip to content
CORS Write-up Intermediate

How I Found SSRF and CORS Misconfigurations in a Modern Web App

The backend API had a CORS misconfiguration that blocked legitimate logins but allowed direct API access, and it also suffered from SSRF and IDOR vulnerabilities. An attacker could bypass browser restrictions to interact with the API, potentially access other users' data via predictable IDs, and force the server to make requests to internal resources.

ibrahimayobamiolaniyi Follow

Published on medium.com

A lot of modern web applications operate on an illusion of security. Developers often rely on browser-level mechanisms to protect their APIs, assuming that if the frontend blocks a request, the backend is safe.

Ibrahim Olaniyi Abiodun, 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 backend API had an incorrect CORS whitelist and lacked proper access controls and input validation for SSRF and IDOR.

Impact

An attacker could bypass browser restrictions to access the API directly, potentially exploit SSRF to reach internal resources, and use IDOR to access other users' data; the CORS misconfiguration also blocked legitimate users from logging in.

What the attacker needed

Access to the API endpoint; ability to bypass browser CORS (e.g., via proxy)

The fix

The CORS whitelist should be corrected to the active domain, UUIDs should replace predictable IDs, and network isolation with firewall rules should be implemented.

How it was found

  1. Intercept traffic with Burp Suite to map the architecture.
  2. Analyse the OPTIONS preflight request to the backend API.
  3. Observe the Access-Control-Allow-Origin header whitelisting an inactive domain.
  4. Bypass CORS using an interception proxy to interact directly with the API.
  5. Perform manual injection tests leading to SSRF and IDOR discovery.
  6. Conduct Nmap reconnaissance revealing exposed ports.

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.

CORS is a browser rule that stops websites from talking to other domains without permission, but it doesn't protect the server itself. Here, the server was set up to only allow an old domain, so real users couldn't log in, but an attacker using tools that ignore browser rules could still reach the API. The API also had flaws that let attackers guess other users' data and trick the server into making requests to internal systems.

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.