Skip to content
XSS Write-up Beginner

Why XSS is serious business (and why Tesco needs to pay attention)

Tesco's website had a cross-site scripting (XSS) vulnerability that was reported to the company but remained unfixed for weeks. An attacker could exploit it to run malicious scripts in a victim's browser, potentially stealing cookies or credentials.

troyhunt.com

Published on troyhunt.com

It was three weeks ago now that I wrote about Lessons in website security anti-patterns by Tesco where I pointed out a whole raft of basic, flawed practices which jeopardised the security and privacy of shoppers. These practices in and of themselves were (are) bad, but what really seemed to fire up a lot of people was…

The author, on troyhunt.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

Impact

An attacker could use the XSS to steal cookies or credentials, but the text notes that some browsers (IE9 and IE10) warn about the exploit, and not all risks shown in the video may be present on Tesco's site.

What the attacker needed

Victim visits a crafted link or page; victim uses a browser that does not block the script

The fix

The vulnerability should be fixed by validating all input against a whitelist and encoding all output for the correct context.

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.

Cross-site scripting (XSS) is a flaw where a website lets an attacker inject their own code into pages that other people view. When a victim loads the page, the attacker's code runs in their browser and can do things like steal their login cookies or redirect them to a fake site. This report says Tesco was told about such a flaw but did not fix it for weeks.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.