CVE-2018-19289: Valine HTML injection via embedded PDF files

CVE-2018-19289 · Severity: low · CVSS 3.1 · Published 2018-11-21

Valine is a JavaScript comment system library used in websites to manage user comments. A vulnerability in versions up to 1.3.3 allows attackers to inject malicious HTML code into comments, which can be used to execute JavaScript code by embedding a PDF file, potentially leading to malware distribution, credential theft, or website defacement.

Technologies: valine (npm). Vendors: npm.

Quick answers

Is CVE-2018-19289 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2018-19289 being exploited in the wild.
How severe is CVE-2018-19289?
Low severity, with a CVSS score of 3.1, published 21 November 2018.
Which products and versions are affected?
valine (npm) SEMVER:introduced=0,fixed=1.3.4.
Is there a fix for CVE-2018-19289?
Yes. valine (npm): upgrade to 1.3.4 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2018-19289 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2018-19289?
Check whether you run valine (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • valine (npm): upgrade to 1.3.4 or later
    npm install valine@1.3.4

Technical details

Valine v1.3.3 and earlier contains a stored cross-site scripting (XSS) vulnerability via improper HTML input validation (CWE-79). An attacker can inject arbitrary HTML—specifically EMBED elements pointing to remotely hosted PDF files—into comments. Since EMBED tags bypass same-origin policy restrictions, the referenced PDF can contain JavaScript payloads that execute in the context of the victim's browser when the comment is viewed. This requires only network access and user interaction (viewing the page), with no authentication needed. The vulnerability was fixed in version 1.3.4 through HTML entity encoding of user input.

Affected products

  • Valine Valine <=1.3.3

Identifiers

  • CVE-2018-19289
  • GHSA-hhrp-qm88-xjr3

Timeline

  • 2018-11-14: disclosed: Issue opened on GitHub
  • 2018-11-21: advisory: GHSA-hhrp-qm88-xjr3 published
  • 2018-11-21: patched: Fix released in v1.3.4 with HTML entity encoding

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.