CVE-2017-16015: forms Cross-Site Scripting in HTML generation

CVE-2017-16015 · Severity: low · CVSS 3 · Published 2018-11-09

The forms library is a Node.js package used to generate HTML forms programmatically. A cross-site scripting (XSS) vulnerability in the form rendering code allows attackers to inject malicious JavaScript into generated forms by crafting specially crafted input that is not properly escaped, potentially compromising end-user security and data.

Vendors: npm.

Quick answers

Is CVE-2017-16015 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2017-16015 being exploited in the wild.
How severe is CVE-2017-16015?
Low severity, with a CVSS score of 3, published 9 November 2018.
Which products and versions are affected?
forms (npm) SEMVER:introduced=0,fixed=1.3.0.
Is there a fix for CVE-2017-16015?
Yes. forms (npm): upgrade to 1.3.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2017-16015 attacked?
It is attacked over the network.
Am I affected by CVE-2017-16015?
Check whether you run forms (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

  • forms (npm): upgrade to 1.3.0 or later
    npm install forms@1.3.0

Technical details

The vulnerability is a reflected/stored cross-site scripting (CWE-80) in the forms library's tag rendering functionality. The library failed to properly escape HTML content when generating form output, allowing attacker-controlled input to be rendered as unescaped HTML in the resulting forms. The vulnerability affects all versions prior to 1.3.0, with no authentication required—any application using forms to render user-supplied input is vulnerable. An attacker can inject arbitrary JavaScript that executes in users' browsers when they interact with affected forms. The fix was committed to ensure all content in the `tag` component is properly escaped before rendering.

Affected products

  • caolan forms <1.3.0

Identifiers

  • CVE-2017-16015
  • GHSA-vwjj-2852-3765

Timeline

  • 2018-11-09: disclosed
  • 2016-11-15: patched: Fix commit merged; version 1.3.0 or later contains the fix

References

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