CVE-2023-26114: Code server Code-server Vulnerable To Missing Origin Vulnerability
CRITICALCVE-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
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).
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.
npm install code-server@4.10.1
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
CVE-2023-26114 Affected Code server Versions
1 component(s)| 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?
Which Code server versions are affected?
What version fixes CVE-2023-26114?
Is code-server affected?
What is the CVSS score of CVE-2023-26114?
What CWE is associated with CVE-2023-26114?
How can I check npm dependencies for CVE-2023-26114?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}