protobufjs: Overlong UTF-8 decoding
protobufjs protobuf.js
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| protobufjs npm |
|
|
| @protobufjs/utf8 npm |
|
|
protobufjs protobuf.js
| Product | Affected | Fixed in |
|---|---|---|
| protobufjs npm |
|
|
| @protobufjs/utf8 npm |
|
|
protobufjs compiles protobuf definitions into JavaScript (JS) functions. Prior to 7.5.6 and 8.0.2, protobufjs includes a minimal UTF-8 decoder that accepted overlong UTF-8 byte sequences and decoded them to their canonical characters instead of replacing them. An attacker who can provide protobuf binary data decoded through the affected UTF-8 path may be able to bypass application-level checks that inspect raw bytes before protobuf string decoding. For example, bytes that do not contain certain ASCII characters could decode to strings containing those characters. This vulnerability is fixed in 7.5.6 and 8.0.2.
From the CVE record · GitHub_M
The protobufjs UTF-8 decoder accepts overlong byte sequences and decodes them as canonical characters. An attacker who can supply protobuf binary data to an affected decoding path may bypass application checks that inspect raw bytes before string decoding. The input does not specify authentication or user-interaction requirements.
Check applications using npm protobufjs versions below 7.5.6 or from 8.0.0 to below 8.0.2, or npm @protobufjs/utf8 versions below 1.1.1.