Lab: CORS vulnerability with trusted null origin
Summary: PortSwigger's lab presents a website with an insecure CORS configuration that trusts the "null" origin, and the task is to craft JavaScript that uses CORS to retrieve the administrator's API key and upload it to an exploit server. The lab is solved when the administrator's API key is submitted, and the provided walkthrough uses an iframe sandbox to generate a null origin request.
Bottom line: A site that trusts the null origin will hand an administrator's API key to any attacker who can get a victim's browser to send a sandboxed request - the lab's entire exploit is a single iframe.
Read the original at PortSwigger Research ↗
- Topics
- Vulnerabilities & Patching
- Related
- Attackers Exploit UnrealIRCd Flaw That Enables Server-Level Command Injection Cyber Risks · Nov 14, 2026U.S. CISA adds Check Point and UnrealIRCd flaws to its Known Exploited Vulnerabilities catalog Cyber Risks · Nov 14, 2026PostgreSQL Patches 52 Flaws, Including 22-Year-Old Bug Enabling Authenticated RCE Cyber Risks · Nov 13, 2026