Prototype Pollution in protobufjs
Published 28 May 2022 · Updated 14 Jan 2025
Affected packages
- Affected
- >=6.11.0 <6.11.3
- Fixed in
- 6.11.3
npm install protobufjs@6.11.3- Affected
- >=6.10.0 <6.10.3
- Fixed in
- 6.10.3
npm install protobufjs@6.10.3Details
The package protobufjs is vulnerable to Prototype Pollution, which can allow an attacker to add/modify properties of the Object.prototype. Versions after and including 6.10.0 until 6.10.3 and after and including 6.11.0 until 6.11.3 are vulnerable.
This vulnerability can occur in multiple ways: 1. by providing untrusted user input to util.setProperty or to ReflectionObject.setParsedOption functions 2. by parsing/loading .proto files
Is GHSA-g954-5hwp-pp24 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected protobufjs, and gives you the command that fixes it.
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2022-25878
- Linkgithub.com/protobufjs/protobuf.js/pull/1731
- Linkgithub.com/protobufjs/protobuf.js/pull/1735
- Linkgithub.com/protobufjs/protobuf.js/commit/b5f1391dff5515894830a6570e6d73f5511b2e8f
- Packagegithub.com/protobufjs/protobuf.js
- Linkgithub.com/protobufjs/protobuf.js/blob/d13d5d5688052e366aa2e9169f50dfca376b32cf/src/util.js%23L176-L197
- Linksnyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-2841507
- Linksnyk.io/vuln/SNYK-JS-PROTOBUFJS-2441248
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.