Skip to content
XSS Write-up Intermediate

Stored XSS to Privilege Escalation in Azuriom CMS — When “Tru

A user with content management permissions can upload an SVG file containing a script. When a higher-privileged user views the SVG, the script runs in their browser and can perform administrative actions such as creating a new admin account.

CradS Follow

Published on medium.com

During a recent review of the Azuriom CMS, I identified a behavior involving SVG file uploads that can lead to privilege escalation through stored cross-site scripting (XSS).

CradS, 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 allows users with content management permissions to upload SVG files without sanitising or restricting script content, and later renders those files in a context where scripts execute.

Impact

An attacker with content management permissions could execute arbitrary JavaScript in the context of a higher-privileged user who views the SVG, potentially leading to privilege escalation such as creating a new administrator account.

What the attacker needed

A user account with content management permissions; victim (higher-privileged user) views the SVG

The fix

The vendor considers this behaviour intended, so no fix is described; a fix would involve sanitising or restricting SVG uploads to prevent script execution.

How it was found

  1. Create a custom Author role with permissions to manage images or posts, and assign a test account to it.
  2. Log in as the low-privileged user.
  3. Create a new post and upload a valid SVG file as the image.
  4. Intercept the HTTP request with Burp Suite and modify the SVG content to include a malicious script.
  5. Save the post; the malicious SVG is stored.
  6. Log in as an administrator and open the malicious SVG in a new browser tab, causing the script to execute and create a new admin account.

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.

Some websites let users with limited rights upload images. If the site accepts SVG images, those files can contain hidden code that runs when someone opens the image. Here, an editor uploaded a malicious SVG, and when an administrator viewed it, the code ran and created a new admin account for the attacker.

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.