Aurelia Framework Insecure Default Allows XSS
Aurelia's default HTML sanitizer only removes SCRIPT elements, so other HTML elements with event handler attributes can execute JavaScript. An attacker could inject such HTML to conduct XSS attacks, potentially stealing sessions or sensitive information.
gosecure.net
Published on gosecure.net
by Mohamed Aziz Acheche | May 12, 2021
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 default sanitizer uses a regular expression that only strips SCRIPT elements and does not sanitise other HTML elements or attributes that can execute JavaScript.
Impact
Users who rely solely on the default sanitizer are not safe from XSS; consequences could include session robbery or leaking sensitive information.
What the attacker needed
Application uses default HTMLSanitizer; attacker can supply HTML input
The fix
Users should override the default HTMLSanitizer with a secure implementation such as DOMPurify or sanitize-html; the vendor added a warning but no patch is confirmed.
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.
Aurelia is a tool for building web pages. It includes a filter meant to clean dangerous HTML, but this filter only removes script tags and ignores other ways to run JavaScript, such as an image tag with an error handler. If a website trusts this filter, an attacker can insert HTML that runs their code in a visitor's browser.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.