Skip to content
Business logic Write-up Beginner

Bypassing Promo Code Validation via Response Manipulation Enabled the Creation of a Business…

The business account signup form validated a promo code on the server, but the client-side application relied on the server's JSON response to decide whether to proceed. By intercepting and altering the response to indicate success, an attacker could bypass the promo code requirement and create a business account without a valid code.

anas0x1 Follow

Published on anas0x1.medium.com

.بِسْ� ِ اللَّهِ الرَّحْ� َٰنِ الرَّحِي� ِ، وَالصَّلَاةُ وَالسَّلَا� ُ عَلَىٰ رَسُولِ اللَّهِ

Anas Ibrahim, on anas0x1.medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the client-side application trusted the server's response to determine promo code validity without additional server-side verification or session state, allowing an attacker to tamper with the response.

Impact

An attacker could create a business account without a valid promo code, potentially gaining access to business features or benefits that are meant to be restricted.

What the attacker needed

A valid email and password; ability to intercept and modify HTTP responses

The fix

The application should not rely solely on client-side validation of the promo code; the server should enforce the promo code requirement and not allow account creation without a valid code, regardless of the response manipulation.

How it was found

  1. Start creating a business account and fill in the required details, including a fake promo code.
  2. Intercept the request that submits the company data and promo code.
  3. Observe the server's response containing an 'Invalid promo code' error.
  4. Modify the response to indicate success (e.g., change the status code and message to 'OK').
  5. Forward the modified response, and the account is created successfully.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

When you sign up for a business account, the website asks for a promo code. The website checks the code by sending it to the server, and the server replies with a message saying if it's valid or not. The problem is that the website trusts that reply completely. An attacker can use a tool to catch the server's reply and change it to say the code is valid, even if it's not. This lets them create a business account without a real promo code.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by anas0x1

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.