CVE-2017-0928: Html janitor Bypassing Sanitization Using DOM Clobbering Vulnerability
MODERATECVE-2017-0928 is a MODERATE (CVSS 6.1) bypassing sanitization using dom clobbering vulnerability (CWE-642: External Control of Critical State Data) affecting Html janitor libraries in the npm ecosystem. The issue involves bypassing sanitization using dom clobbering in html-janitor. Remediation is available in the latest vendor maintenance releases.
CVE-2017-0928 at a Glance
Security Impact
CVSS: 6.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N).
How to Fix CVE-2017-0928
To remediate this vulnerability, upgrade all affected Html janitor dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install html-janitor@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls html-janitor
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2017-0928, inspect your project dependencies using npm:
npm ls html-janitor
Analyze the terminal output to locate any version of Html janitor in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The npm ls html-janitor command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-642: External Control of Critical State Data, where the product stores security-critical state information about its users, or the product itself, in a location that is accessible to unauthorized actors. In Html janitor, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2017-0928 Affected Html janitor Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
html-janitor
|
npm |
|
|
References
Frequently Asked Questions
What is CVE-2017-0928?
Which Html janitor versions are affected?
What version fixes CVE-2017-0928?
Is html-janitor affected?
What is the CVSS score of CVE-2017-0928?
What CWE is associated with CVE-2017-0928?
How can I check npm dependencies for CVE-2017-0928?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-fx46-whrj-73v5",
"modified" : "2023-09-12T20:47:14Z",
"published" : "2018-07-24T20:06:17Z",
"aliases" : [ "CVE-2017-0928" ],
"summary" : "Bypassing Sanitization using DOM clobbering in html-janitor",
"details" : "All versions of `html-janitor` are vulnerable to cross-site scripting (XSS).\n\nArbitrary HTML can pass the sanitization process, which can be unexpected and dangerous (XSS) in case user-controlled input is passed to the clean function.\"\n\n\n## Recommendation\n\nUpgrade to version 2.0.4 or later.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "html-janitor"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "< 2.0.4"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-0928"
}, {
"type" : "WEB",
"url" : "https://github.com/guardian/html-janitor/issues/35"
}, {
"type" : "WEB",
"url" : "https://hackerone.com/reports/308158"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-fx46-whrj-73v5"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/569"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-547", "CWE-642" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:35:41Z",
"nvd_published_at" : null
}
}