Skip to content
XSS Write-up Beginner

Stored xss exposed cookies via .svg in [ cisco] = P3 Bug → P1

A stored cross-site scripting vulnerability existed in the Cisco Community reply/comment feature because it allowed users to upload SVG files containing embedded JavaScript without sanitisation. An attacker could upload a malicious SVG that, when opened by another user, executed JavaScript in the same-origin context and exposed session cookies via document.cookie.

Sai Jayanth Follow

Published on medium.com

This story goes back to my early bug hunting days when I was actively exploring large platforms to understand how real-world applications handle user input. While browsing the Cisco Community, I wasn’t aggressively testing — I was simply observing features and user interactions.

Sai Jayanth, 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

Likely the application allowed SVG uploads without sanitising embedded JavaScript, and served them in a way that executed scripts in the site's origin.

Impact

Stored XSS could execute attacker-controlled JavaScript in the same-origin context, expose session cookies via document.cookie, and potentially lead to session hijacking or account takeover if cookies are replayable.

What the attacker needed

A free community account; victim clicks the uploaded SVG

The fix

The issue was resolved, likely by sanitising or disallowing SVG uploads with embedded scripts.

How it was found

  1. Create two normal community user accounts (attacker and victim).
  2. Log in as the attacker and go to a public discussion thread with reply/comment functionality.
  3. Upload an SVG file containing embedded JavaScript and publish the reply so the SVG is publicly visible.
  4. Log out and log in as the victim, then navigate to the same discussion thread.
  5. Open the uploaded SVG in a new browser tab and observe JavaScript execution.
  6. Open the browser console and verify that document.cookie is accessible.

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.

SVG files are images, but they are written in a markup language that can include scripts. If a website lets people upload SVG files and then shows them to other users without cleaning them, an attacker can hide JavaScript inside the image. When a victim opens the image, that script runs as if it were part of the website, which can let the attacker read the victim's cookies and potentially take over their account.

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 Sai Jayanth

View all

2 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.