Cyber Risks · PortSwigger Research

Lab: Authentication bypass via encryption oracle

Summary: This PortSwigger lab contains a logic flaw that exposes an encryption oracle to users, and solving it requires exploiting that flaw to reach the admin panel and delete the user carlos. The lab shows that an error message reflects the email parameter in cleartext, which must be decrypted from the notification cookie, and that copying the stay-logged-in cookie into the notification cookie returns the decrypted value in the format username:timestamp.

Bottom line: An error message that echoes decrypted input turns a routine notification cookie into a working decryption oracle, letting an attacker read the contents of a stay-logged-in cookie and learn the exact username:timestamp format needed to forge one.

Read the original at PortSwigger Research ↗

Topics
Vulnerabilities & Patching
Related