CVE-2023-36665: Protobufjs Protobufjs Prototype Pollution Vulnerability Vulnerability
CRITICALCVE-2023-36665 is a CRITICAL (CVSS 9.8) protobufjs prototype pollution vulnerability vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Protobufjs libraries in the npm ecosystem. The issue involves protobufjs prototype pollution vulnerability. Remediation is available by upgrading affected packages to version 7.2.5, 6.11.4.
CVE-2023-36665 at a Glance
Security Impact
CVSS: 9.8
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:H/I:H/A:H).
How to Fix CVE-2023-36665
To remediate this vulnerability, upgrade all affected Protobufjs 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 protobufjs@7.2.5
npm install protobufjs@6.11.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls protobufjs
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2023-36665, inspect your project dependencies using npm:
npm ls protobufjs
Analyze the terminal output to locate any version of Protobufjs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.2.5), your application is affected.
Note: The npm ls protobufjs 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-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In Protobufjs, 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-36665 Affected Protobufjs Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
protobufjs
|
npm |
≥ 7.0.0
< 7.2.5
|
7.2.5
|
|
protobufjs
|
npm |
≥ 6.10.0
< 6.11.4
|
6.11.4
|
References
Frequently Asked Questions
What is CVE-2023-36665?
Which Protobufjs versions are affected?
What version fixes CVE-2023-36665?
Is protobufjs affected?
What is the CVSS score of CVE-2023-36665?
What CWE is associated with CVE-2023-36665?
How can I check npm dependencies for CVE-2023-36665?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-h755-8qp9-cq85",
"modified" : "2024-06-28T18:31:41Z",
"published" : "2023-07-05T15:30:24Z",
"aliases" : [ "CVE-2023-36665" ],
"summary" : "protobufjs Prototype Pollution vulnerability",
"details" : "protobuf.js (aka protobufjs) 6.10.0 until 6.11.4 and 7.0.0 until 7.2.4 allows Prototype Pollution, a different vulnerability than CVE-2022-25878. A user-controlled protobuf message can be used by an attacker to pollute the prototype of Object.prototype by adding and overwriting its data and functions. Exploitation can involve: (1) using the function parse to parse protobuf messages on the fly, (2) loading .proto files by using load/loadSync functions, or (3) providing untrusted input to the functions ReflectionObject.setParsedOption and util.setProperty. NOTE: this CVE Record is about `Object.constructor.prototype.<new-property> = ...;` whereas CVE-2022-25878 was about `Object.__proto__.<new-property> = ...;` instead.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "protobufjs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0.0"
}, {
"fixed" : "7.2.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "protobufjs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.10.0"
}, {
"fixed" : "6.11.4"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-36665"
}, {
"type" : "WEB",
"url" : "https://github.com/protobufjs/protobuf.js/issues/1918#issuecomment-1723500294"
}, {
"type" : "WEB",
"url" : "https://github.com/protobufjs/protobuf.js/pull/1899"
}, {
"type" : "WEB",
"url" : "https://github.com/protobufjs/protobuf.js/commit/e66379f451b0393c27d87b37fa7d271619e16b0d"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/protobufjs/protobuf.js"
}, {
"type" : "WEB",
"url" : "https://github.com/protobufjs/protobuf.js/commits/release-6.11.4"
}, {
"type" : "WEB",
"url" : "https://github.com/protobufjs/protobuf.js/compare/protobufjs-v7.2.3...protobufjs-v7.2.4"
}, {
"type" : "WEB",
"url" : "https://github.com/protobufjs/protobuf.js/releases/tag/protobufjs-v7.2.4"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20240628-0006"
}, {
"type" : "WEB",
"url" : "https://www.code-intelligence.com/blog/cve-protobufjs-prototype-pollution-cve-2023-36665"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1321" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2023-07-07T20:19:02Z",
"nvd_published_at" : "2023-07-05T14:15:09Z"
}
}