CVE-2017-0928: Html janitor Bypassing Sanitization Using DOM Clobbering Vulnerability

MODERATE
Advisory Identifier: GHSA-fx46-whrj-73v5
CVSS 6.1
CWE-642 CWE-547
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2017-0928
GHSA Identifier GHSA-fx46-whrj-73v5
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-642: External Control of Critical State Data
Affected Product Html janitor
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (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.

html-janitor fixed: Latest secure release
npm install html-janitor@Latest secure release
Verify Direct and Transitive Dependencies

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

All versions of `html-janitor` are vulnerable to cross-site scripting (XSS). Arbitrary HTML can pass the sanitization process, which can be unexpected and dangerous (XSS) in case user-controlled input is passed to the clean function." ## Recommendation Upgrade to version 2.0.4 or later.

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?
CVE-2017-0928 is a security vulnerability in Html janitor involving Bypassing Sanitization using DOM clobbering in html-janitor under CWE-642: External Control of Critical State Data.
Which Html janitor versions are affected?
Affected versions include releases prior to current release patches across affected packages: html-janitor.
What version fixes CVE-2017-0928?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is html-janitor affected?
Yes, html-janitor is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2017-0928?
CVE-2017-0928 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2017-0928?
CVE-2017-0928 is classified under CWE-642: External Control of Critical State Data (The product stores security-critical state information about its users, or the product itself, in a location that is accessible to unauthorized actors.).
How can I check npm dependencies for CVE-2017-0928?
Run the dependency tree command: 'npm ls html-janitor'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}