CVE-2017-16006: Remarkable Cross-Site Scripting Vulnerability

HIGH
Advisory Identifier: GHSA-mrmf-qwxg-7c3h
CWE-79
Published
Advisory Summary

CVE-2017-16006 is a HIGH cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Remarkable libraries in the npm ecosystem. The issue involves xss in data uri in remarkable. Remediation is available by upgrading affected packages to version 1.7.0.

CVE-2017-16006 at a Glance

CVE Identifier CVE-2017-16006
GHSA Identifier GHSA-mrmf-qwxg-7c3h
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Remarkable
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2017-16006

To remediate this vulnerability, upgrade all affected Remarkable dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

remarkable fixed: 1.7.0
npm install remarkable@1.7.0
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 remarkable

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2017-16006, inspect your project dependencies using npm:

npm ls remarkable

Analyze the terminal output to locate any version of Remarkable in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.7.0), your application is affected.

Note: The npm ls remarkable 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-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Remarkable, 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

Affected versions of `remarkable` are vulnerable to cross-site scripting. Vulnerable versions of the package allow the use of `data:` URIs in links, and can therefore execute javascript. ## Proof of Concept ```markdown [link](data:text/html,<script>alert('0')</script>) ``` ## Recommendation Update to v1.7.0 or later

CVE-2017-16006 Affected Remarkable Versions

1 component(s)
Fixed Versions:
1.7.0
Product / Package Ecosystem Affected Versions Fixed Version
remarkable
npm
< 1.7.0
1.7.0

References

Frequently Asked Questions

What is CVE-2017-16006?
CVE-2017-16006 is a security vulnerability in Remarkable involving XSS in Data URI in remarkable under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Remarkable versions are affected?
Affected versions include releases prior to 1.7.0 across affected packages: remarkable.
What version fixes CVE-2017-16006?
Upgrading to 1.7.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is remarkable affected?
Yes, remarkable is affected in releases prior to 1.7.0. Upgrade your dependency to 1.7.0 or later.
What CWE is associated with CVE-2017-16006?
CVE-2017-16006 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check npm dependencies for CVE-2017-16006?
Run the dependency tree command: 'npm ls remarkable'. 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-mrmf-qwxg-7c3h",
  "modified" : "2023-09-08T19:51:45Z",
  "published" : "2018-11-09T17:48:20Z",
  "aliases" : [ "CVE-2017-16006" ],
  "summary" : "XSS in Data URI in remarkable",
  "details" : "Affected versions of `remarkable` are vulnerable to cross-site scripting. Vulnerable versions of the package allow the use of `data:` URIs in links, and can therefore execute javascript. \n\n\n## Proof of Concept\n\n```markdown\n[link](data:text/html,<script>alert('0')</script>)\n```\n\n\n## Recommendation\n\nUpdate to v1.7.0 or later",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "remarkable"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.7.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.6.2"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-16006"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jonschlinkert/remarkable/issues/227"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-mrmf-qwxg-7c3h"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/319"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:47:10Z",
    "nvd_published_at" : null
  }
}