Vulnerability GHSA-xq3m-2v4x-88gg

Critical
CRITICAL RISK
CVSS Score: 9.8
Score Range: 9.0–10.0
Critical severity vulnerabilities (CVSS 9.0–10.0). These represent the highest impact issues.
6 months ago
April 16, 2026 at 10:34 PM UTC
protobufjs has an arbitrary code execution issue
0.0.0 - 6.11.5 and 7.0.0 - 7.5.4 and 8.0.0 - 8.0.1-experimental
0.0.0 - 6.11.5 and 7.0.0 - 7.5.4 and 8.0.0 - 8.0.1-experimental

Summary

protobufjs has an arbitrary code execution issue

Details

Summary

protobufjs could execute generated JavaScript code derived from protobuf schema metadata. When loading a crafted JSON descriptor, schema-controlled type names and type references could reach runtime code generation without sufficient validation.

Impact

An attacker who can provide a malicious protobuf definition or JSON descriptor to an application may be able to execute arbitrary JavaScript in the context of the process using protobufjs.

This requires control over the protobuf schema or descriptor being loaded. Applications that only decode messages using trusted, application-defined schemas are not directly affected by this issue.

Preconditions

  • The application must allow an attacker to control or influence a protobuf definition or JSON descriptor.
  • The application must load that definition through protobufjs reflection APIs such as descriptor loading.
  • The affected generated-code path must be reached, for example by performing an operation on the loaded type.

Workarounds

Do not load protobuf definitions or JSON descriptors from untrusted sources with affected versions. If untrusted schemas must be accepted, validate or restrict them before loading and run schema processing in an isolated environment.

Impacted packages

Timeline

Published
6 months ago
April 16, 2026 at 10:34 PM UTC
Fixed (8.0.1)
7 months ago
April 04, 2026 at 07:23 PM UTC
Fixed (7.5.5)
6 months ago
April 15, 2026 at 04:40 AM UTC
Fixed (6.11.6)
6 months ago
May 03, 2026 at 07:34 PM UTC
Last Modified
3 hours ago
November 04, 2026 at 05:28 PM UTC