Vulnerabilities in pkg:npm/@novnc/novnc

PACKAGE
Advisory Identifier: GHSA-49rv-g7w5-m8xx
Advisory Summary

CVE-2017-18635 is a MODERATE (CVSS 6.1) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting @novnc/novnc libraries in the npm ecosystem. The issue involves cross-site scripting in @novnc/novnc. Remediation is available by upgrading affected packages to version 0.6.2.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@novnc/novnc

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-49rv-g7w5-m8xx CVE-2017-18635 MODERATE Cross-Site Scripting in @novnc/novnc

CVE-2017-18635 at a Glance

CVE Identifier CVE-2017-18635
GHSA Identifier GHSA-49rv-g7w5-m8xx
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product @novnc/novnc
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.1/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-18635

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

@novnc/novnc fixed: 0.6.2
npm install @novnc/novnc@0.6.2
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 @novnc/novnc

How to Check if You Are Affected

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

npm ls @novnc/novnc

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

Note: The npm ls @novnc/novnc 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 @novnc/novnc, 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 `@novnc/novnc` prior to 0.6.2 are vulnerable to Cross-Site Scripting (XSS). The package fails to validate input from the remote VNC server such as the VNC server name. This allows an attacker in control of the remote server to execute arbitrary JavaScript in the noVNC web page. It affects any users of `include/ui.js` and users of `vnc_auto.html` and `vnc.html`. ## Recommendation Upgrade to version 0.6.2 or later.

CVE-2017-18635 Affected @novnc/novnc Versions

1 component(s)
Fixed Versions:
0.6.2
Product / Package Ecosystem Affected Versions Fixed Version
@novnc/novnc
npm
< 0.6.2
0.6.2

References

Frequently Asked Questions

What is CVE-2017-18635?
CVE-2017-18635 is a security vulnerability in @novnc/novnc involving Cross-Site Scripting in @novnc/novnc under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which @novnc/novnc versions are affected?
Affected versions include releases prior to 0.6.2 across affected packages: @novnc/novnc.
What version fixes CVE-2017-18635?
Upgrading to 0.6.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @novnc/novnc affected?
Yes, @novnc/novnc is affected in releases prior to 0.6.2. Upgrade your dependency to 0.6.2 or later.
What is the CVSS score of CVE-2017-18635?
CVE-2017-18635 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2017-18635?
CVE-2017-18635 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-2017-18635?
Run the dependency tree command: 'npm ls @novnc/novnc'. 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-49rv-g7w5-m8xx",
  "modified" : "2021-09-23T19:08:01Z",
  "published" : "2020-08-28T21:24:59Z",
  "aliases" : [ "CVE-2017-18635" ],
  "summary" : "Cross-Site Scripting in @novnc/novnc",
  "details" : "Versions of `@novnc/novnc` prior to 0.6.2 are vulnerable to Cross-Site Scripting (XSS). The package fails to validate input from the remote VNC server such as the VNC server name. This allows an attacker in control of the remote server to execute arbitrary JavaScript in the noVNC web page. It affects any users of `include/ui.js` and users of `vnc_auto.html` and `vnc.html`.\n\n\n## Recommendation\n\nUpgrade to version 0.6.2 or later.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@novnc/novnc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.6.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-18635"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/novnc/noVNC/issues/748"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/novnc/noVNC/commit/6048299a138e078aed210f163111698c8c526a13#diff-286f7dc7b881e942e97cd50c10898f03L534"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2020:0754"
  }, {
    "type" : "WEB",
    "url" : "https://bugs.launchpad.net/horizon/+bug/1656435"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ShielderSec/cve-2017-18635"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/novnc/noVNC"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/novnc/noVNC/releases/tag/v0.6.2"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2019/10/msg00004.html"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2021/12/msg00024.html"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JS-NOVNCNOVNC-469136"
  }, {
    "type" : "WEB",
    "url" : "https://usn.ubuntu.com/4522-1"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/1204"
  }, {
    "type" : "WEB",
    "url" : "https://www.shielder.it/blog/exploiting-an-old-novnc-xss-cve-2017-18635-in-openstack"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-08-28T21:21:28Z",
    "nvd_published_at" : "2019-09-25T23:15:00Z"
  }
}