CVE-2020-26296: Vega Cross-Site Scripting Vulnerability

LOW
Advisory Identifier: GHSA-r2qc-w64x-6j54
CVSS 8.7
CWE-79
Published
Advisory Summary

CVE-2020-26296 is a LOW (CVSS 8.7) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Vega libraries in the npm ecosystem. The issue involves xss in vega. Remediation is available by upgrading affected packages to version 5.17.3.

CVE-2020-26296 at a Glance

CVE Identifier CVE-2020-26296
GHSA Identifier GHSA-r2qc-w64x-6j54
Severity LOW
CVSS v3.1 Base Score 8.7
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Vega
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.7

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

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

How to Fix CVE-2020-26296

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

vega fixed: 5.17.3
npm install vega@5.17.3
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 vega

How to Check if You Are Affected

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

npm ls vega

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

Note: The npm ls vega 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 Vega, 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

Vega is a visualization grammar, a declarative format for creating, saving, and sharing interactive visualization designs. Vega in an npm package. In Vega before version 5.17.3 there is an XSS vulnerability in Vega expressions. Through a specially crafted Vega expression, an attacker could execute arbitrary javascript on a victim's machine. This is fixed in version 5.17.3

CVE-2020-26296 Affected Vega Versions

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

References

Frequently Asked Questions

What is CVE-2020-26296?
CVE-2020-26296 is a security vulnerability in Vega involving XSS in Vega under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Vega versions are affected?
Affected versions include releases prior to 5.17.3 across affected packages: vega.
What version fixes CVE-2020-26296?
Upgrading to 5.17.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is vega affected?
Yes, vega is affected in releases prior to 5.17.3. Upgrade your dependency to 5.17.3 or later.
What is the CVSS score of CVE-2020-26296?
CVE-2020-26296 has a CVSS v3.1 base score of 8.7 (LOW) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N.
What CWE is associated with CVE-2020-26296?
CVE-2020-26296 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-2020-26296?
Run the dependency tree command: 'npm ls vega'. 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-r2qc-w64x-6j54",
  "modified" : "2021-01-07T22:32:50Z",
  "published" : "2020-12-30T23:09:21Z",
  "aliases" : [ "CVE-2020-26296" ],
  "summary" : "XSS in Vega",
  "details" : "Vega is a visualization grammar, a declarative format for creating, saving, and sharing interactive visualization designs. Vega in an npm package.\nIn Vega before version 5.17.3 there is an XSS vulnerability in Vega expressions. Through a specially crafted Vega expression, an attacker could\nexecute arbitrary javascript on a victim's machine.\n\nThis is fixed in version 5.17.3",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "vega"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.17.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/vega/vega/security/advisories/GHSA-r2qc-w64x-6j54"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-26296"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/vega/vega/issues/3018"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/vega/vega/pull/3019"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/vega/vega/releases/tag/v5.17.3"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/package/vega"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-12-30T23:08:59Z",
    "nvd_published_at" : "2020-12-30T23:15:00Z"
  }
}