Skip to content
XSS Advisory Intermediate CVE-2022-32763

Lansweeper lansweeper SanitizeHtml cross-site scripting (XSS) vulnerability

The HTML sanitiser in Lansweeper allowed the button element's formaction attribute without sanitising it, so an attacker could inject JavaScript that runs when a user clicks the button. This could lead to arbitrary JavaScript execution in the context of the application.

Marcin 'Icewall' Noga Follow

Originally disclosed on Cisco Talos

Critical 9.1 View original

A cross-site scripting (xss) sanitization vulnerability bypass exists in the SanitizeHtml functionality of Lansweeper lansweeper 10.1.1.0. A specially-crafted HTTP request can lead to arbitrary Javascript code injection.

Marcin 'Icewall' Noga, on Cisco Talos

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 report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The sanitiser's allowlist permitted the formaction attribute on button elements without validating its value, allowing a javascript: URL.

Impact

An attacker could execute arbitrary JavaScript in a victim's browser when the victim clicks the injected button, potentially leading to account compromise or other actions.

What the attacker needed

Authenticated user with permission to edit news; victim clicks the button

The fix

The sanitiser should validate or disallow the formaction attribute on button elements, or restrict it to safe URL schemes.

How it was found

  1. Send a POST request to the editnews action with a crafted news text containing a button with a formaction attribute set to a javascript URL.
  2. The server stores the news item without sanitising the formaction attribute.
  3. When a user views the news and clicks the button, the JavaScript executes.

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 report has not been written yet. The Original tab links to the source.

A sanitiser is a filter that removes dangerous parts from user-supplied HTML. Here the filter allowed a button with a special attribute that can hold a JavaScript link, so clicking the button ran the attacker's code. This is called cross-site scripting (XSS).

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 Marcin 'Icewall' Noga

View all

146 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

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.