CVE-2017-0928: Cross-Site Scripting (XSS) in html-janitor

html-janitor Updated 02 Oct 2025

Summary

24/07/2018
No i
Moderate
6.1

CVE-2017-0928: Bypassing Sanitization using DOM clobbering in html-janitor. Affected versions are not published. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

html-janitor is an npm package that provides a sanitization process for HTML content. It is commonly used to clean user-controlled input to prevent cross-site scripting (XSS) attacks. However, all versions of html-janitor are vulnerable to a bypassing sanitization issue using DOM clobbering. This vulnerability allows arbitrary HTML to pass the sanitization process, potentially leading to XSS attacks if user-controlled input is passed to the clean function.

Vulnerability Detail

The vulnerability in html-janitor arises from the improper handling of user-controlled input during the sanitization process. This allows an attacker to inject arbitrary HTML code that will not be properly sanitized, leading to potential XSS attacks. The impact of this vulnerability can be severe, as it allows an attacker to execute malicious scripts in the context of a victim's browser, potentially compromising sensitive user data or performing unauthorized actions.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

There is no known workaround for this vulnerability. It is crucial to upgrade to the fixed version of html-janitor to mitigate the risk of XSS attacks.

Conclusion

The vulnerability in html-janitor allows for bypassing sanitization, potentially leading to cross-site scripting (XSS) attacks. It is crucial to upgrade to version 2.0.4 or later to fix this vulnerability and mitigate the risk. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for html-janitor →

Share this vulnerability

FAQ

html-janitor is an npm package that provides a sanitization process for HTML content, helping to prevent cross-site scripting (XSS) attacks.

The vulnerability allows an attacker to bypass the sanitization process in html-janitor, potentially leading to XSS attacks. This can result in the execution of malicious scripts in the context of a victim's browser, compromising sensitive user data or performing unauthorized actions.

To fix this vulnerability, it is recommended to upgrade to version 2.0.4 or later of html-janitor.

There is no known workaround for this vulnerability. It is crucial to upgrade to the fixed version of html-janitor to mitigate the risk of XSS attacks.

Related vulnerabilities

Recent vulnerabilities recorded for html-janitor.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback