Vulnerabilities in pkg:npm/video.js

PACKAGE
Advisory Identifier: GHSA-pp7m-6j83-m7r6
Advisory Summary

CVE-2021-23414 is a MODERATE (CVSS 6.5) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Video.js libraries in the npm ecosystem. The issue involves cross-site scripting in video.js. Remediation is available by upgrading affected packages to version 7.14.3.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/video.js

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/video.js. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-pp7m-6j83-m7r6 CVE-2021-23414 MODERATE Cross-site Scripting in video.js

CVE-2021-23414 at a Glance

CVE Identifier CVE-2021-23414
GHSA Identifier GHSA-pp7m-6j83-m7r6
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Video.js
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.5

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:L/I:L/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 Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2021-23414

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

video.js fixed: 7.14.3
npm install video.js@7.14.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 video.js

How to Check if You Are Affected

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

npm ls video.js

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

Note: The npm ls video.js 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 Video.js, 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

This affects the package video.js before 7.14.3. The src attribute of track tag allows to bypass HTML escaping and execute arbitrary code.

CVE-2021-23414 Affected Video.js Versions

1 component(s)
Fixed Versions:
7.14.3
Product / Package Ecosystem Affected Versions Fixed Version
video.js
npm
< 7.14.3
7.14.3

References

Frequently Asked Questions

What is CVE-2021-23414?
CVE-2021-23414 is a security vulnerability in Video.js involving Cross-site Scripting in video.js under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Video.js versions are affected?
Affected versions include releases prior to 7.14.3 across affected packages: video.js.
What version fixes CVE-2021-23414?
Upgrading to 7.14.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is video.js affected?
Yes, video.js is affected in releases prior to 7.14.3. Upgrade your dependency to 7.14.3 or later.
What is the CVSS score of CVE-2021-23414?
CVE-2021-23414 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2021-23414?
CVE-2021-23414 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-2021-23414?
Run the dependency tree command: 'npm ls video.js'. 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-pp7m-6j83-m7r6",
  "modified" : "2021-08-31T21:01:29Z",
  "published" : "2021-08-10T16:09:36Z",
  "aliases" : [ "CVE-2021-23414" ],
  "summary" : "Cross-site Scripting in video.js",
  "details" : "This affects the package video.js before 7.14.3.\n The src attribute of track tag allows to bypass HTML escaping and execute arbitrary code.\n\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "video.js"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "7.14.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-23414"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/videojs/video.js/commit/b3acf663641fca0f7a966525a72845af7ec5fab2"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/videojs/video.js"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2DHYIIAUXUBHMBEDYU7TYNZXEN2W2SA2"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/74SXNGA5RIWM7QNX7H3G7SYIQLP4UUGV"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NLRJB5JNKK3VVBLV3NH3RI7COEDAXSAB"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWER-1533588"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1533587"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JS-VIDEOJS-1533429"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-08-02T18:36:58Z",
    "nvd_published_at" : "2021-07-28T08:15:00Z"
  }
}