Cyber Risks · PortSwigger Research

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