Skip to content
Business logic Write-up Intermediate

*🧨 The Idempotency Bug That Made Retries Duplicate Orders*

A Spring Boot order endpoint used automatic retries on payment calls without idempotency, so when a payment succeeded but the response was lost, the retry charged the customer again. An attacker could trigger duplicate charges by causing a timeout or connection reset during checkout.

Dolly Follow

Published on systemweakness.com

� operation is idempotent � side effects are deduplicated � database enforces uniqueness � response is replayable

Dolly, on systemweakness.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 payment call was retried without an idempotency key, so a lost response led to a second charge.

Impact

Customers could be charged twice for the same order, leading to refunds and loss of trust.

What the attacker needed

A checkout flow with retries; ability to cause a timeout or reset

The fix

The fix was to require an Idempotency-Key header, store it before charging, and make the payment service idempotent as well.

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 a payment request is sent, the server might charge the card but the reply never reaches the client. The client then retries, and without a way to recognise the same request, the server charges again. This is called a duplicate charge and it happens because retries are not safe unless the operation is idempotent (doing it twice has the same effect as doing it once).

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 Dolly

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.