protobufjs
Ecosystem: npm
Downloads: 407.4 Mln
- 2CriticalAffects 5 versions
- 6HighAffects 12 versions
- 0MediumAffects 0 versions
- 10ModerateAffects 18 versions
- 0LowAffects 0 versions
- Critical2 (11.1%)
- High6 (33.3%)
- Medium0 (0.0%)
- Moderate10 (55.6%)
- Low0 (0.0%)
Monthly breakdown
- Critical
- High
- Medium
- Moderate
- Low
- 2 vulnerabilities
- Critical: 0
- High: 0
- Medium: 0
- Moderate: 2
- Low: 0
- 3 vulnerabilities
- Critical: 0
- High: 1
- Medium: 0
- Moderate: 2
- Low: 0
- 8 vulnerabilities
- Critical: 0
- High: 4
- Medium: 0
- Moderate: 4
- Low: 0
- 1 vulnerabilities
- Critical: 1
- High: 0
- Medium: 0
- Moderate: 0
- Low: 0
- 1 vulnerabilities
- Critical: 1
- High: 0
- Medium: 0
- Moderate: 0
- Low: 0
- 1 vulnerabilities
- Critical: 0
- High: 1
- Medium: 0
- Moderate: 0
- Low: 0
- 1 vulnerabilities
- Critical: 0
- High: 0
- Medium: 0
- Moderate: 1
- Low: 0
- 1 vulnerabilities
- Critical: 0
- High: 0
- Medium: 0
- Moderate: 1
- Low: 0
Vulnerabilities (18)
Known vulnerabilities affecting protobufjs, based on data from OSV.
| ID | Severity | Summary | Affected versions | Published | Source |
|---|---|---|---|---|---|
| GHSA-j3f2-48v5-ccww | Moderate | protobufjs: Denial of Service via infinite loop in .proto option parsing## Summary protobufjs parsed option names by advancing through schema tokens until it reached an `=` token, without checking for end of input. A crafted `.proto` schema that opens an option declaration but ends prematurely could cause the option parser to loop without ever terminating. This affects the reflection parsing path (`parse`, `Root.load`, `Root.loadSync`). ## Impact An attacker who can provide or influence `.proto` schema text parsed by an application may be able to cause the parsing call to never return. Because Node.js is single-threaded, the blocked event loop prevents all oth |
| GitHub (opens in a new tab) | |
| GHSA-jfj6-75fj-8934 | Moderate | protobufjs: Text Format string map parsing can mutate returned map object prototype## Summary The protobuf.js text format extension parsed string-keyed map entries using ordinary property assignment. A text-format map entry with key `__proto__` could therefore change the prototype of the returned map object instead of creating an own map entry. This affected the optional Text Format extension. Other protobufjs input paths, including binary decode, `fromObject`, and ProtoJSON conversion, are not affected. ## Impact An attacker who can provide protobuf text-format input parsed by an application using `protobufjs/ext/textformat` may be able to create message objects whose s |
| GitHub (opens in a new tab) | |
| GHSA-94rc-8x27-4472 | Moderate | protobufjs: Memory amplification from preserved unknown fields in binary decode## Summary protobufjs 8.2.0 added support for preserving unknown fields encountered during binary decode. Affected versions preserved unknown wire elements in `message.$unknowns` and did not provide a decode-time option to discard unknown fields before retaining them. A crafted protobuf payload containing many unknown fields could therefore cause a decoded message to retain substantially more memory than the input size would suggest, even when unknown-field round-tripping is not needed. protobufjs 8.5.0 added the relevant decode-time options, allowing applications that decode untrusted proto |
| GitHub (opens in a new tab) | |
| GHSA-f38q-mgvj-vph7 | Moderate | protobufjs : Schema-derived names can shadow runtime-significant properties## Summary protobufjs accepted certain schema-derived names that could collide with properties used by protobufjs runtime helpers. The known affected names are fields named `hasOwnProperty`, field or oneof names such as `$type` when loaded through protobufjs JSON/reflection descriptors, and service methods whose generated helper name is `rpcCall`. When affected message or service types were used, protobufjs could read schema-controlled data where it expected an own-property helper, reflected type metadata, or the base RPC helper. This could cause deterministic exceptions or recursive calls i |
| GitHub (opens in a new tab) | |
| GHSA-wcpc-wj8m-hjx6 | High | protobufjs: Denial of service through unbounded Any expansion during JSON conversion## Summary protobufjs could recurse without a depth limit while converting decoded messages to plain objects or JSON. This affected generated `toObject()` conversion and the custom `google.protobuf.Any` JSON conversion path. A crafted protobuf binary payload containing deeply nested `Any` values could cause the JavaScript call stack to be exhausted during conversion to JSON. ## Impact An attacker who can provide protobuf binary data decoded by an application may be able to crash the process or otherwise cause message conversion to fail with a stack overflow. This affects applications that |
| GitHub (opens in a new tab) | |
| GHSA-jggg-4jg4-v7c6 | Moderate | protobufjs: Denial of Service via unbounded recursive JSON descriptor expansion## Summary protobufjs could recurse without a depth limit while expanding nested JSON descriptors through `Root.fromJSON()` and `Namespace.addJSON()`. A crafted JSON descriptor with deeply nested namespace definitions could cause the JavaScript call stack to be exhausted during descriptor loading. ## Impact An attacker who can provide JSON descriptors loaded by an application may be able to crash the process or otherwise cause schema loading to fail with a stack overflow. This affects applications that load JSON descriptors from untrusted sources with affected versions. ## Preconditions |
| GitHub (opens in a new tab) | |
| GHSA-2pr8-phx7-x9h3 | Moderate | protobuf.js: Denial of service from crafted field names in generated code## Summary protobufjs generated JavaScript property accessors from schema-controlled field and oneof names. Certain control characters in field names were not escaped before being embedded into generated function bodies. A crafted schema or JSON descriptor could therefore cause generated encode, decode, verify, or conversion functions to fail during compilation. ## Impact An attacker who can provide or influence a protobuf schema or JSON descriptor may be able to make affected message types unusable by causing protobufjs runtime code generation to throw a syntax error. This is a denial of |
| GitHub (opens in a new tab) | |
| GHSA-66ff-xgx4-vchm | High | protobuf.js: Code injection through bytes field defaults in generated toObject code## Summary protobufjs generated JavaScript for `toObject` conversion could include an unsafe expression derived from a schema-controlled `bytes` field default value. A crafted descriptor with a non-string default value for a `bytes` field could cause attacker-controlled code to be emitted into the generated conversion function. ## Impact An attacker who can provide or influence a protobuf descriptor may be able to execute arbitrary JavaScript in the context of the process using protobufjs. This requires the application to load an attacker-controlled schema or descriptor and then convert a |
| GitHub (opens in a new tab) | |
| GHSA-685m-2w69-288q | High | protobuf.js: Denial of service through unbounded protobuf recursion## Summary protobufjs could recurse without a depth limit while decoding nested protobuf data. This affected both skipping unknown group fields and generated decoding of nested message fields. A crafted protobuf binary payload could cause the JavaScript call stack to be exhausted during decoding. ## Impact An attacker who can provide protobuf binary data decoded by an application may be able to crash the process or otherwise cause decoding to fail with a stack overflow. This affects applications that decode untrusted protobuf binary input with affected versions. ## Preconditions - The a |
| GitHub (opens in a new tab) | |
| GHSA-75px-5xx7-5xc7 | High | protobuf.js: Code generation gadget after prototype pollution## Summary protobufjs used plain objects with inherited prototypes for internal type lookup tables used by generated encode and decode functions. If `Object.prototype` had already been polluted, those lookup tables could resolve attacker-controlled inherited properties as valid protobuf type information. This could cause attacker-controlled strings to be emitted into generated JavaScript code. ## Impact An attacker who can first trigger a prototype pollution vulnerability may be able to influence generated protobufjs encode or decode functions in a way that can lead to arbitrary JavaScript |
| GitHub (opens in a new tab) |
- GHSA-j3f2-48v5-ccwwModerateprotobufjs: Denial of Service via infinite loop in .proto option parsing
>= 7.5.0, < 7.6.5>= 8.0.0, < 8.6.6
## Summary protobufjs parsed option names by advancing through schema tokens until it reached an `=` token, without checking for end of input. A crafted `.proto` schema that opens an option declaration but ends prematurely could cause the option parser to loop without ever terminating. This affects the reflection parsing path (`parse`, `Root.load`, `Root.loadSync`). ## Impact An attacker who can provide or influence `.proto` schema text parsed by an application may be able to cause the parsing call to never return. Because Node.js is single-threaded, the blocked event loop prevents all oth
CVE: CVE-2026-59877
- GHSA-jfj6-75fj-8934Moderateprotobufjs: Text Format string map parsing can mutate returned map object prototype
>= 8.2.0, < 8.6.5
## Summary The protobuf.js text format extension parsed string-keyed map entries using ordinary property assignment. A text-format map entry with key `__proto__` could therefore change the prototype of the returned map object instead of creating an own map entry. This affected the optional Text Format extension. Other protobufjs input paths, including binary decode, `fromObject`, and ProtoJSON conversion, are not affected. ## Impact An attacker who can provide protobuf text-format input parsed by an application using `protobufjs/ext/textformat` may be able to create message objects whose s
CVE: CVE-2026-59876
- GHSA-94rc-8x27-4472Moderateprotobufjs: Memory amplification from preserved unknown fields in binary decode
>= 8.2.0, < 8.5.0
## Summary protobufjs 8.2.0 added support for preserving unknown fields encountered during binary decode. Affected versions preserved unknown wire elements in `message.$unknowns` and did not provide a decode-time option to discard unknown fields before retaining them. A crafted protobuf payload containing many unknown fields could therefore cause a decoded message to retain substantially more memory than the input size would suggest, even when unknown-field round-tripping is not needed. protobufjs 8.5.0 added the relevant decode-time options, allowing applications that decode untrusted proto
CVE: CVE-2026-54270
- GHSA-f38q-mgvj-vph7Moderateprotobufjs : Schema-derived names can shadow runtime-significant properties
< 7.6.3>= 8.0.0, < 8.6.0
## Summary protobufjs accepted certain schema-derived names that could collide with properties used by protobufjs runtime helpers. The known affected names are fields named `hasOwnProperty`, field or oneof names such as `$type` when loaded through protobufjs JSON/reflection descriptors, and service methods whose generated helper name is `rpcCall`. When affected message or service types were used, protobufjs could read schema-controlled data where it expected an own-property helper, reflected type metadata, or the base RPC helper. This could cause deterministic exceptions or recursive calls i
CVE: CVE-2026-54269
- GHSA-wcpc-wj8m-hjx6Highprotobufjs: Denial of service through unbounded Any expansion during JSON conversion
< 7.6.1>= 8.0.0, < 8.4.1
## Summary protobufjs could recurse without a depth limit while converting decoded messages to plain objects or JSON. This affected generated `toObject()` conversion and the custom `google.protobuf.Any` JSON conversion path. A crafted protobuf binary payload containing deeply nested `Any` values could cause the JavaScript call stack to be exhausted during conversion to JSON. ## Impact An attacker who can provide protobuf binary data decoded by an application may be able to crash the process or otherwise cause message conversion to fail with a stack overflow. This affects applications that
CVE: CVE-2026-48712
- GHSA-jggg-4jg4-v7c6Moderateprotobufjs: Denial of Service via unbounded recursive JSON descriptor expansion
< 7.5.8>= 8.0.0, < 8.2.0
## Summary protobufjs could recurse without a depth limit while expanding nested JSON descriptors through `Root.fromJSON()` and `Namespace.addJSON()`. A crafted JSON descriptor with deeply nested namespace definitions could cause the JavaScript call stack to be exhausted during descriptor loading. ## Impact An attacker who can provide JSON descriptors loaded by an application may be able to crash the process or otherwise cause schema loading to fail with a stack overflow. This affects applications that load JSON descriptors from untrusted sources with affected versions. ## Preconditions
CVE: CVE-2026-45740
- GHSA-2pr8-phx7-x9h3Moderateprotobuf.js: Denial of service from crafted field names in generated code
< 7.5.6>= 8.0.0, < 8.0.2
## Summary protobufjs generated JavaScript property accessors from schema-controlled field and oneof names. Certain control characters in field names were not escaped before being embedded into generated function bodies. A crafted schema or JSON descriptor could therefore cause generated encode, decode, verify, or conversion functions to fail during compilation. ## Impact An attacker who can provide or influence a protobuf schema or JSON descriptor may be able to make affected message types unusable by causing protobufjs runtime code generation to throw a syntax error. This is a denial of
CVE: CVE-2026-44294
- GHSA-66ff-xgx4-vchmHighprotobuf.js: Code injection through bytes field defaults in generated toObject code
< 7.5.6>= 8.0.0, < 8.0.2
## Summary protobufjs generated JavaScript for `toObject` conversion could include an unsafe expression derived from a schema-controlled `bytes` field default value. A crafted descriptor with a non-string default value for a `bytes` field could cause attacker-controlled code to be emitted into the generated conversion function. ## Impact An attacker who can provide or influence a protobuf descriptor may be able to execute arbitrary JavaScript in the context of the process using protobufjs. This requires the application to load an attacker-controlled schema or descriptor and then convert a
CVE: CVE-2026-44293
- GHSA-685m-2w69-288qHighprotobuf.js: Denial of service through unbounded protobuf recursion
< 7.5.6>= 8.0.0, < 8.0.2
## Summary protobufjs could recurse without a depth limit while decoding nested protobuf data. This affected both skipping unknown group fields and generated decoding of nested message fields. A crafted protobuf binary payload could cause the JavaScript call stack to be exhausted during decoding. ## Impact An attacker who can provide protobuf binary data decoded by an application may be able to crash the process or otherwise cause decoding to fail with a stack overflow. This affects applications that decode untrusted protobuf binary input with affected versions. ## Preconditions - The a
CVE: CVE-2026-44289
- GHSA-75px-5xx7-5xc7Highprotobuf.js: Code generation gadget after prototype pollution
< 7.5.6>= 8.0.0, < 8.0.2
## Summary protobufjs used plain objects with inherited prototypes for internal type lookup tables used by generated encode and decode functions. If `Object.prototype` had already been polluted, those lookup tables could resolve attacker-controlled inherited properties as valid protobuf type information. This could cause attacker-controlled strings to be emitted into generated JavaScript code. ## Impact An attacker who can first trigger a prototype pollution vulnerability may be able to influence generated protobufjs encode or decode functions in a way that can lead to arbitrary JavaScript
CVE: CVE-2026-44291