VYPR
Moderate severityNVD Advisory· Published Jun 4, 2018· Updated Sep 17, 2024

CVE-2017-0928

CVE-2017-0928

Description

An external control of critical state data in html-janitor before 2.0.4 allows attackers to bypass sanitization by manipulating the '_sanitized' variable via DOM clobbering.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

An external control of critical state data in html-janitor before 2.0.4 allows attackers to bypass sanitization by manipulating the '_sanitized' variable via DOM clobbering.

Vulnerability

The html-janitor npm package before version 2.0.4 contains an External Control of Critical State Data vulnerability [1], [2]. The library uses an internal _sanitized variable to track whether input has been cleaned. Because this variable is user-controllable (e.g., via DOM clobbering or other property injection), an attacker can set it to a value that causes the sanitization logic to be skipped entirely [2].

Exploitation

No authentication or special network position is required if the application accepts user-supplied HTML and passes it to versions < 2.0.4. The attacker crafts input that sets _sanitized to a truthy or otherwise bypass-inducing value (DOM clobbering is the documented vector). The sanitizer then treats the data as already clean and returns it unmodified [2].

Impact

Successful exploitation allows an attacker to inject arbitrary HTML or JavaScript into the output, leading to cross-site scripting (XSS) and potential theft of session cookies, data exfiltration, or other client-side attacks [2]. The scope is the same as the application's origin.

Mitigation

Upgrade to html-janitor version 2.0.4 or later, which was released in 2018 and fixes the vulnerability by properly isolating the _sanitized state variable [1], [2]. No workarounds are documented for older versions; updating is the recommended action.

AI Insight generated on May 22, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
html-janitornpm
>= 0

Affected products

2

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

5

News mentions

0

No linked articles in our index yet.