CVE-2023-26114: Code server Code-server Vulnerable To Missing Origin Vulnerability

CRITICAL
Advisory Identifier: GHSA-frjg-g767-7363
CVSS 9.3
CWE-346 CWE-1385
Published
Advisory Summary

CVE-2023-26114 is a CRITICAL (CVSS 9.3) code-server vulnerable to missing origin vulnerability (CWE-346: Origin Validation Error) affecting Code server libraries in the npm ecosystem. The issue involves code-server vulnerable to missing origin validation in websockets. Remediation is available by upgrading affected packages to version 4.10.1.

CVE-2023-26114 at a Glance

CVE Identifier CVE-2023-26114
GHSA Identifier GHSA-frjg-g767-7363
Severity CRITICAL
CVSS v3.1 Base Score 9.3
CWE Classification CWE-346: Origin Validation Error
Affected Product Code server
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 9.3

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

How to Fix CVE-2023-26114

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

code-server fixed: 4.10.1
npm install code-server@4.10.1
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 code-server

How to Check if You Are Affected

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

npm ls code-server

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

Note: The npm ls code-server 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-346: Origin Validation Error, where the product does not properly verify that the source of data or communication is valid. In Code server, 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 the package code-server before 4.10.1 are vulnerable to Missing Origin Validation in WebSockets handshakes. Exploiting this vulnerability can allow an adversary in specific scenarios to access data from and connect to the code-server instance.

CVE-2023-26114 Affected Code server Versions

1 component(s)
Fixed Versions:
4.10.1
Product / Package Ecosystem Affected Versions Fixed Version
code-server
npm
< 4.10.1
4.10.1

References

Frequently Asked Questions

What is CVE-2023-26114?
CVE-2023-26114 is a security vulnerability in Code server involving code-server vulnerable to Missing Origin Validation in WebSockets under CWE-346: Origin Validation Error.
Which Code server versions are affected?
Affected versions include releases prior to 4.10.1 across affected packages: code-server.
What version fixes CVE-2023-26114?
Upgrading to 4.10.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is code-server affected?
Yes, code-server is affected in releases prior to 4.10.1. Upgrade your dependency to 4.10.1 or later.
What is the CVSS score of CVE-2023-26114?
CVE-2023-26114 has a CVSS v3.1 base score of 9.3 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N.
What CWE is associated with CVE-2023-26114?
CVE-2023-26114 is classified under CWE-346: Origin Validation Error (The product does not properly verify that the source of data or communication is valid.).
How can I check npm dependencies for CVE-2023-26114?
Run the dependency tree command: 'npm ls code-server'. 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-frjg-g767-7363",
  "modified" : "2023-03-27T22:32:09Z",
  "published" : "2023-03-23T06:30:15Z",
  "aliases" : [ "CVE-2023-26114" ],
  "summary" : "code-server vulnerable to Missing Origin Validation in WebSockets",
  "details" : "Versions of the package code-server before 4.10.1 are vulnerable to Missing Origin Validation in WebSockets handshakes. Exploiting this vulnerability can allow an adversary in specific scenarios to access data from and connect to the code-server instance.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "code-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.10.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-26114"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coder/code-server/commit/d477972c68fc8c8e8d610aa7287db87ba90e55c7"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/coder/code-server"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coder/code-server/releases/tag/v4.10.1"
  }, {
    "type" : "WEB",
    "url" : "https://security.snyk.io/vuln/SNYK-JS-CODESERVER-3368148"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1385", "CWE-346" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-03-23T19:58:10Z",
    "nvd_published_at" : "2023-03-23T05:15:00Z"
  }
}