Skip to content
XSS Write-up Beginner

How I discovered CVE-2026–27147 — Stored XSS | Cyber Tamarin

The application allowed uploading SVG files without sanitisation, and these files could contain JavaScript that executed when viewed. An attacker could upload a malicious SVG to perform stored cross-site scripting, potentially leading to session hijacking or account takeover.

medium.com

Published on medium.com

While testing a web application as part of a security assessment, I came across a file upload functionality intended strictly for uploading images. The application appeared to enforce strong restrictions by blocking common executable and markup-based file types such as .php, .html, and .js.

Cyber Tamarin, on medium.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

The application relied on extension-based filtering and did not sanitise SVG content, allowing embedded JavaScript to execute when the file was rendered.

Impact

The stored XSS could lead to session hijacking, credential theft, arbitrary actions on behalf of users, and account takeover in certain contexts.

What the attacker needed

Ability to upload files; victim views the uploaded SVG

The fix

The application should sanitise SVG content server-side, remove or neutralise script execution, enforce proper Content-Type headers, and consider disabling SVG uploads if not required.

How it was found

  1. Upload a crafted SVG file containing a script
  2. Access the uploaded file through the application
  3. Observe JavaScript execution in the browser

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.

The website let people upload image files, but it didn't check what was inside them. SVG files are a type of image that can also contain code. Because the site didn't clean the file, that code ran in the browser of anyone who viewed the image, letting an attacker do things like steal login sessions.

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.