Triag Team sometimes unfair
A reflected cross-site scripting flaw existed in the coupon code parameter of a store's checkout page, because the value was not sanitised before being reflected back. An attacker could send a crafted link to a victim who had items in their cart, and script in the link would run in the victim's browser.
medium.com
Published on medium.com
when users click on this url the cpncode will take command alert(document. cookie) and will reflect value to the victim
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 coupon code parameter was written into the checkout page without encoding or validation, so markup in the value was treated as page content.
Impact
A victim with items in their cart who opened the crafted link could have script run in their session, which the author says could read cookies; the attack only worked once the victim had reached the coupon code step of checkout.
What the attacker needed
Victim has an item in their cart; victim clicks a crafted link; victim reaches the coupon code step
How it was found
- Add an item to the shopping cart.
- Go to the checkout page, where the site asks for a coupon code.
- Open the crafted URL containing the coupon code value.
- The script in the coupon code runs in the browser and the value is reflected to the victim.
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 reflected cross-site scripting bug means a website takes something from a link and puts it straight into the page without cleaning it first. If that something is code rather than plain text, the browser runs it as if the site itself had written it. Here the coupon code field on a checkout page did this, so a booby-trapped link could run code in a shopper's browser.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.