GHSA-9xr8-8hmc-389f: Vant Cross-Site Scripting Vulnerability

HIGH
CVSS 9.1
CWE-79
Published
Advisory Summary

GHSA-9xr8-8hmc-389f is a HIGH (CVSS 9.1) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Vant libraries in the npm ecosystem. The issue involves cross-site scripting in vant. Remediation is available by upgrading affected packages to version 2.1.8.

GHSA-9xr8-8hmc-389f at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-9xr8-8hmc-389f
Severity HIGH
CVSS v3.1 Base Score 9.1
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Vant
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 9.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix GHSA-9xr8-8hmc-389f

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

vant fixed: 2.1.8
npm install vant@2.1.8
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 vant

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-9xr8-8hmc-389f, inspect your project dependencies using npm:

npm ls vant

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

Note: The npm ls vant 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 Vant, 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

Versions of `vant` prior to 2.1.8 are vulnerable to Cross-Site Scripting. The text value of the `Picker` component column is not sanitized, which may allow attackers to execute arbitrary JavaScript in a victim's browser. ## Recommendation Upgrade to version 2.1.8 or later.

GHSA-9xr8-8hmc-389f Affected Vant Versions

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

References

Frequently Asked Questions

What is GHSA-9xr8-8hmc-389f?
GHSA-9xr8-8hmc-389f is a security vulnerability in Vant involving Cross-Site Scripting in vant under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Vant versions are affected?
Affected versions include releases prior to 2.1.8 across affected packages: vant.
What version fixes GHSA-9xr8-8hmc-389f?
Upgrading to 2.1.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is vant affected?
Yes, vant is affected in releases prior to 2.1.8. Upgrade your dependency to 2.1.8 or later.
What is the CVSS score of GHSA-9xr8-8hmc-389f?
GHSA-9xr8-8hmc-389f has a CVSS v3.1 base score of 9.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with GHSA-9xr8-8hmc-389f?
GHSA-9xr8-8hmc-389f 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 GHSA-9xr8-8hmc-389f?
Run the dependency tree command: 'npm ls vant'. 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-9xr8-8hmc-389f",
  "modified" : "2021-08-18T22:47:15Z",
  "published" : "2019-11-22T13:45:33Z",
  "aliases" : [ ],
  "summary" : "Cross-Site Scripting in vant",
  "details" : "Versions of `vant` prior to 2.1.8 are vulnerable to Cross-Site Scripting. The text value of the `Picker` component column is not sanitized, which may allow attackers to execute arbitrary JavaScript in a victim's browser.\n\n\n## Recommendation\n\nUpgrade to version 2.1.8 or later.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "vant"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.1.8"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/youzan/vant/issues/4270"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/youzan/vant/pull/4278/commits/d777b78c7dc2c904f474d057ea88449cfe2ca13a"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JS-VANT-460461"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/1157"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2019-11-21T04:18:24Z",
    "nvd_published_at" : null
  }
}