Arbitrary Code Injection Affecting protobufjs package, versions <7.6.2>=8.0.0-experimental <8.5.0


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary Code Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-PROTOBUFJS-17362837
  • published17 Jun 2026
  • disclosed15 Jun 2026
  • creditJacob Brackett

Introduced: 15 Jun 2026

NewCVE-2026-54271  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade protobufjs to version 7.6.2, 8.5.0 or higher.

Overview

protobufjs is a protocol buffer for JavaScript (& TypeScript).

Affected versions of this package are vulnerable to Arbitrary Code Injection via the pbjs static code generation. An attacker can execute arbitrary code by providing crafted schema names that are incorporated into generated JavaScript output, which is then executed or imported by the application or build process.

Note:

This is only exploitable if the application or build process runs pbjs static code generation on a pre-parsed JSON descriptor influenced by an attacker, the generated JavaScript file is subsequently executed or imported, and an affected generated API path is invoked.

CVSS Base Scores

version 4.0
version 3.1