Skip to content
XSS Write-up Beginner

CVE-2020-10596 in OpenCart

The profile image upload feature in the OpenCart admin panel did not escape user-supplied filenames, allowing an authenticated attacker to inject script that executes when the image is viewed. The same payload also executed when used as a directory name.

Kailash Bohara Follow

Published on kailashbohara.com.np

Security engineer with 9 years of experience in penetration testing, security architecture, cloud security, zero trust implementation, and threat hunting.

Kailash Bohara, on kailashbohara.com.np

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 authenticated admin user could execute script in the context of the admin panel, though the author notes the fix would not help if the payload file was uploaded via FTP.

What the attacker needed

Authenticated admin access

The fix

The author suggested sanitising filenames with a regular expression that strips special characters, and a GitHub commenter proposed a similar filter; the text does not say whether a fix was released.

How it was found

  1. Log in to the admin panel.
  2. Navigate to system > users and edit an existing user.
  3. In the image change section, select a file whose name contains the XSS payload and save it.

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 when a website displays user input without cleaning it, so a malicious script runs in another user's browser. Here, an admin could upload an image whose filename contained script code, and that code would run when the image was shown. The attacker must already be logged in to the admin panel.

What is XSS?

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

More by Kailash Bohara

View all

7 more disclosed reports, best first.

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.