Lab: Flawed enforcement of business rules
Summary: PortSwigger's Web Security Academy lab describes a purchasing workflow with a logic flaw: a logged-in user with credentials wiener:peter can obtain two coupon codes, NEWCUST5 and SIGNUP30, and apply both at checkout. Entering the same code twice in a row is rejected because the coupon has already been applied, but alternating between the two codes bypasses that control and lets the codes be reused until the order total falls below the remaining store credit.
What you should know: The control that stops coupon reuse only checks the last code entered, so a single-use rule enforced per request rather than per coupon lets an attacker stack discounts until the item is effectively free.
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