Loading...
Skip to main content

CVE-2026-41242 — Arbitrary code execution in protobufjs — CVE Details

CRITICAL

Arbitrary code execution in protobufjs

Published April 16, 2026Updated September 10, 2026Source: osv

Summary

## 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.

Advisory Timeline

  • First published April 16, 2026 (179 days ago).
  • Last revised September 10, 2026 — 146 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

npm
Update protobufjs to 8.0.1 or later
npm install protobufjs@8.0.1
npm
Update protobufjs to 7.5.5 or later
npm install protobufjs@7.5.5

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: npm (1).

PackageEcosystemAffectedFixed In
protobufjs
npm
All versions8.0.1
protobufjs
npm
All versions7.5.5

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2026-41242?
Arbitrary code execution in protobufjs This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
How do I check if my project is affected by CVE-2026-41242?
CVE-2026-41242 affects protobufjs. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-41242 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.8

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-xq3m-2v4x-88gg

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies