CRITICAL 9.8

CVE-2026-41242

protobufjs has an arbitrary code execution issue

Description

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.

Affected Maven artifacts (2)

ArtifactAffected versionsFixed in
org.mvnpm » protobufjsvia npm protobufjs
< 6.11.6>= 7.0.0, < 7.5.5>= 8.0.0, < 8.0.1
6.11.6, 7.5.5, 8.0.1
org.webjars.npm » protobufjsvia npm protobufjs
< 6.11.6>= 7.0.0, < 7.5.5>= 8.0.0, < 8.0.1
6.11.6, 7.5.5, 8.0.1

Blast radius

2affected artifacts
34affected versions
25dependent artifacts (est.)
381dependent versions

8% of the dependent artifacts (2) still pull an affected version in their latest release.

DepthDependent versions
Direct
36
2 hops
68
3 hops
27
4 hops
29
5 hops
85
6 hops
136

Most used dependents

Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.

Other ecosystems

Also affects npm (1 package) . See all on OSV