protobufjs: Schema-derived names can shadow runtime-significant properties
protobufjs protobuf.js
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| protobufjs npm |
|
|
| protobufjs-cli npm |
|
protobufjs protobuf.js
| Product | Affected | Fixed in |
|---|---|---|
| protobufjs npm |
|
|
| protobufjs-cli npm |
|
2.5.11.3.3protobufjs compiles protobuf definitions into JavaScript (JS) functions. Prior to 8.6.0 and 7.6.3, 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 in affected decode post-checks, verification, object conversion, reflected JSON serialization, or protobufjs RPC helper invocation. This vulnerability is fixed in 8.6.0 and 7.6.3.
From the CVE record · GitHub_M
protobufjs can accept schema-derived names that collide with properties used by its runtime helpers. When affected message or service types are used, those collisions can cause deterministic exceptions or recursive calls during decoding, verification, conversion, serialization, or RPC helper invocation. The input does not specify an attack route, authentication requirement, or user interaction.
Check npm protobufjs installations below 7.6.3 or from 8.0.0 to below 8.6.0, and npm protobufjs-cli installations below 1.3.3 or from 2.0.0 to below 2.5.1.