Skip to content
Business logic Write-up Beginner

Logic Poisoning: How One Bad Review Broke Ratings

The review-saving API accepted a star rating outside the allowed range and still returned success. Submitting such an invalid rating caused the shop page to show no reviews at all, hiding every review until a valid rating was submitted again.

medium.com

Published on medium.com

Hey Hackers, I am Parth Narula. A penetration tester, bug hunter, red teamer and overall a security researcher.

Parth Narula, on 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 server did not validate that the star rating was within the allowed range before saving it, and the page's review display then failed when it encountered the invalid value.

Impact

An attacker could hide all reviews for any shop on the platform, which could damage the shop's reputation and business; the reviews could later be restored by submitting a valid rating.

What the attacker needed

Ability to submit a review for a shop

The fix

The server should validate that the star rating is within the allowed range before saving it.

How it was found

  1. Capture the request to the review save API while rewriting a review.
  2. Change the stars value to an out-of-range number such as 6 and replay the request.
  3. Refresh the shop page and observe that all reviews are gone.
  4. Replay the request with a valid star value such as 3 and refresh to see reviews return.

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.

A shop page shows customer reviews and an average rating. The server that saves a review did not check that the star value was between 1 and 5. Sending an impossible value like 6 stars made the page's review display break, so it showed no reviews at all.

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.

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.