5.3medium
protobufjs: Denial of service from crafted field names in generated code
- Severity
- 5.3medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.43% (higher than 39% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-2pr8-phx7-x9h3
Description
protobufjs compiles protobuf definitions into JavaScript (JS) functions. Prior to 7.5.6 and 8.0.2, 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. This vulnerability is fixed in 7.5.6 and 8.0.2.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| protobufjs protobuf.js | < 7.5.6, >= 8.0.0, < 8.0.2 | CVE List |
| protobufjs (npm) | before 7.5.6, from 8.0.0 before 8.0.2 | GitHub Advisory Database |
| protobufjs_project protobufjs | before 7.5.6, from 8.0.0 before 8.0.2 | NVD |
All scores
| GitHub_M | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| GitHub | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
protobufjs compiles protobuf definitions into JavaScript (JS) functions. Prior to 7.5.6 and 8.0.2, 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. This vulnerability is fixed in 7.5.6 and 8.0.2.
GitHub Advisory Database
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 service issue for applications that load untrusted schemas or descriptors. Applications that only use trusted, application-defined schemas are not directly affected by this issue.
The issue is not known to allow code execution by itself.
Preconditions
- The application must allow an attacker to control or influence a protobuf schema or JSON descriptor.
- The crafted input must define a field name containing control characters that reach generated JavaScript property access.
- The application must perform an operation that triggers protobufjs code generation for the affected type, such as encode, decode, verify,
fromObject, ortoObject.
Workarounds
Do not load protobuf schemas or JSON descriptors from untrusted sources with affected versions. If untrusted schemas must be accepted, validate field names before loading them and reject names containing control characters.
NVD (es)
protobufjs compila definiciones de protobuf en funciones de JavaScript (JS). Antes de 7.5.6 y 8.0.2, protobufjs generaba descriptores de acceso a propiedades de JavaScript a partir de nombres de campos y de ’oneof’ controlados por el esquema. Ciertos caracteres de control en los nombres de los campos no se escapaban antes de ser incrustados en los cuerpos de las funciones generadas. Un esquema o descriptor JSON manipulado podría, por lo tanto, causar que las funciones generadas de codificación, decodificación, verificación o conversión fallaran durante la compilación. Esta vulnerabilidad está corregida en 7.5.6 y 8.0.2.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-44294 changed 2026-05-13 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-2pr8-phx7-x9h3 changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-44294 changed 2026-11-11 | Public domain |