Loading...
Skip to main content

CVE-2026-44295 — protobuf.js: Code injection in protobufjs-cli —...

HIGH

protobuf.js: Code injection in pbjs static output from crafted schema names

Published May 12, 2026Updated September 10, 2026Source: osv

Summary

## Summary `pbjs` static code generation could emit unsafe JavaScript identifiers derived from schema-controlled names. When generating static JavaScript from a crafted schema or JSON descriptor, certain namespace, enum, service, or derived full names could be written into the generated output without sufficient sanitization. ## Impact An attacker who can provide or influence schemas passed to `pbjs` may be able to cause generated JavaScript output to contain attacker-controlled code. The injected code would run if the generated file is later executed or imported by the application or build process. This affects the protobufjs CLI static code generation path. Applications that only use trusted schemas, or that do not execute generated output from untrusted schemas, are not directly affected. ## Preconditions - The application or build process must run `pbjs` static code generation on a schema or JSON descriptor influenced by an attacker. - The attacker-controlled input must contain crafted schema names that reach generated JavaScript output. - The generated JavaScript file must subsequently be executed, imported, or otherwise evaluated. ## Workarounds Do not run affected versions of `pbjs` static code generation on untrusted schemas or descriptors. If untrusted schemas must be accepted, validate schema names before code generation and run generation in an isolated environment.

Advisory Timeline

  • First published May 12, 2026 (153 days ago).
  • Last revised September 10, 2026 — 121 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

npm
Update protobufjs-cli to 2.0.2 or later
npm install protobufjs-cli@2.0.2
npm
Update protobufjs-cli to 1.2.1 or later
npm install protobufjs-cli@1.2.1

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

Affected Packages (2)

Affects 1 ecosystem: npm (1).

PackageEcosystemAffectedFixed In
protobufjs-cli
npm
All versions2.0.2
protobufjs-cli
npm
All versions1.2.1

Vulnerability Classification

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

CVSS Score Breakdown

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

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

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

Frequently Asked Questions

What is CVE-2026-44295?
protobuf.js: Code injection in pbjs static output from crafted schema names This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.7/10).
How do I check if my project is affected by CVE-2026-44295?
CVE-2026-44295 affects protobufjs-cli. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-44295 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.7

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-6r35-46g8-jcw9

Related CVEs

  • CVE-2026-107375
    HIGH

    JHipster: SQL Injection in the Parameter of JHipster-Generated Reactive (WebFlux + R2DBC) Applicationssort

  • CVE-2026-107384
    HIGH

    MariaDB Connector/Node.js: SQL injection through object keys in SET expansion (permitSetMultiParamEntries)

Check if you're affected

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

Scan Your Dependencies