Skip to content
XSS Write-up Intermediate

Zoneminder – Web App Testing – Oct 2022

ZoneMinder versions before 1.36.26 had a log injection flaw, a CSRF bypass using HTTP GET, and a stored XSS in the file parameter. Chained together, a low-privileged user could make an admin's browser delete other users.

Trenches Follow

Published on trenchesofit.com

I decided to spend a bit of time testing the web application to see if I could find a few vulnerabilities. My review of the project began on September 27th, 2022.

Trenches of IT (@TrenchesofIT), on trenchesofit.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 failed to sanitise log data before rendering it, accepted state-changing actions over GET without a CSRF token, and did not properly validate the file parameter.

Impact

A low-privileged user could cause an authenticated admin to perform actions such as deleting users, potentially leading to data loss or account takeover.

What the attacker needed

A low-privileged account with View permissions; admin views the log page; authentication enabled

The fix

The vulnerabilities were fixed by sanitising log input, enforcing CSRF protection for state-changing actions, and sanitising the file parameter.

How it was found

  1. Log in with a low-privilege user that has only View permissions.
  2. Proxy the log request and modify the message parameter to inject data into the logs.
  3. Replace the file parameter with a payload that breaks out of the table cells and includes a script tag.
  4. Convert the request from POST to GET and remove the CSRF token to bypass CSRF protection.
  5. Have an admin user visit the view=log page, which executes the stored script and performs the delete user action.

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.

A low-privileged user could write malicious content into the application's logs. When an administrator viewed the log page, that content ran as a script in the admin's browser, letting the attacker perform admin actions like deleting users.

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.