CVE-2017-16015: Forms Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-vwjj-2852-3765
CVSS 6.1
CWE-80
Published
Advisory Summary

CVE-2017-16015 is a MODERATE (CVSS 6.1) cross-site scripting vulnerability (CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)) affecting Forms libraries in the npm ecosystem. The issue involves cross-site scripting in forms. Remediation is available by upgrading affected packages to version 1.3.0.

CVE-2017-16015 at a Glance

CVE Identifier CVE-2017-16015
GHSA Identifier GHSA-vwjj-2852-3765
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)
Affected Product Forms
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-16015

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

forms fixed: 1.3.0
npm install forms@1.3.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 forms

How to Check if You Are Affected

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

npm ls forms

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

Note: The npm ls forms 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-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS), where the product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special characters such as "<", ">", and "&" that could be interpreted as web-scripting elements when they are sent to a downstream component that processes web pages. In Forms, 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 `forms` do not properly escape HTML in generated forms, which may result in cross-site scripting. ## Recommendation Update to version 1.3.0 or later.

CVE-2017-16015 Affected Forms Versions

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

References

Frequently Asked Questions

What is CVE-2017-16015?
CVE-2017-16015 is a security vulnerability in Forms involving Cross-Site Scripting in forms under CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS).
Which Forms versions are affected?
Affected versions include releases prior to 1.3.0 across affected packages: forms.
What version fixes CVE-2017-16015?
Upgrading to 1.3.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is forms affected?
Yes, forms is affected in releases prior to 1.3.0. Upgrade your dependency to 1.3.0 or later.
What is the CVSS score of CVE-2017-16015?
CVE-2017-16015 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-16015?
CVE-2017-16015 is classified under CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) (The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special characters such as "<", ">", and "&" that could be interpreted as web-scripting elements when they are sent to a downstream component that processes web pages.).
How can I check npm dependencies for CVE-2017-16015?
Run the dependency tree command: 'npm ls forms'. 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-vwjj-2852-3765",
  "modified" : "2023-09-07T18:28:05Z",
  "published" : "2018-11-09T17:46:27Z",
  "aliases" : [ "CVE-2017-16015" ],
  "summary" : "Cross-Site Scripting in forms",
  "details" : "Affected versions of `forms` do not properly escape HTML in generated forms, which may result in cross-site scripting.\n\n\n## Recommendation\n\nUpdate to version 1.3.0 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" : "forms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.3.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-16015"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/caolan/forms/commit/bc01e534a0ff863dedb2026a50bd03153bbc6a5d"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-vwjj-2852-3765"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/158"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-80" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:58:34Z",
    "nvd_published_at" : null
  }
}