Protobufjs: Improperly Controlled Modification of Object Prototype Attributes
CVE-2023-36665 is a critical-severity improperly controlled modification of object prototype attributes vulnerability in Protobufjs from Protobufjs Project, with a CVSS 3.1 base score of 9.8 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. The record lists version 7.2.5 as the first without the flaw, so updating Protobufjs to that release or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 1.7% chance of exploitation within 30 days, higher than 78% of scored CVEs.
Critical severity: a successful attack would have severe impact.
What to do
- Update Protobufjs to 7.2.5 or a later version.
- Read the advisory on github.com for workarounds and exact fixed builds.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Protobufjs Project | Protobufjs | 6.10.0 up to, but not including, 7.2.5 | 7.2.5 |
Version data comes from NVD's product matching. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.
Official description
"protobuf.js (aka protobufjs) 6.10.0 through 7.x before 7.2.5 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.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Improperly Controlled Modification of Object Prototype Attributes
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.
How developers prevent this class of flaw
- By freezing the object prototype first (for example, Object.freeze(Object.prototype)), modification of the prototype becomes impossible.
- By blocking modifications of attributes that resolve to object prototype, such as proto or prototype, this weakness can be mitigated.
- When handling untrusted objects, validating using a schema can be used.
More Improperly Controlled Modification of Object Prototype Attributes vulnerabilities (CWE-1321)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: partial).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- github.com/protobufjs/protobuf.js/commit/e66379f451b0393c27d87b37fa7d271619e16b0d
- github.com/protobufjs/protobuf.js/compare/protobufjs-v7.2.3...protobufjs-v7.2.4
- github.com/protobufjs/protobuf.js/releases/tag/protobufjs-v7.2.4Release Notes
- code-intelligence.com/blog/cve-protobufjs-prototype-pollution-cve-2023-36665Exploit, Third Party Advisory
Other references
Other vulnerabilities in Protobufjs
- 7.5 High severity
- 7.5 High severity
- 7.5 High severity
- 8.8 High severity
- 8.1 High severity
- 7.5 High severity
Recent Improperly Controlled Modification of Object Prototype Attributes vulnerabilities
- 9.8 Critical severity
- 9.8 Critical severity
- 7.5 High severity
- 7.8 High severity
- 10.0 Critical severity
- 10.0 Critical severity
Spotted an error? Tell us.