Cyber Risks · PortSwigger Research

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