CVE-2026-42290: Protobufjs cli Protobuf.js Is Vulnerable To OS Vulnerability

HIGH
Advisory Identifier: GHSA-f84p-cvgm-xgjj
CVSS 7.8
CWE-78
Published
Advisory Summary

CVE-2026-42290 is a HIGH (CVSS 7.8) protobuf.js is vulnerable to os vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Protobufjs cli libraries in the npm ecosystem. The issue involves protobuf.js is vulnerable to os command injection in the cli. Remediation is available by upgrading affected packages to version 1.2.1, 2.0.2.

CVE-2026-42290 at a Glance

CVE Identifier CVE-2026-42290
GHSA Identifier GHSA-f84p-cvgm-xgjj
Severity HIGH
CVSS v3.1 Base Score 7.8
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product Protobufjs cli
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-42290

To remediate this vulnerability, upgrade all affected Protobufjs cli dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

protobufjs-cli fixed: 1.2.1
npm install protobufjs-cli@1.2.1
protobufjs-cli fixed: 2.0.2
npm install protobufjs-cli@2.0.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls protobufjs-cli

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-42290, inspect your project dependencies using npm:

npm ls protobufjs-cli

Analyze the terminal output to locate any version of Protobufjs cli in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.1), your application is affected.

Note: The npm ls protobufjs-cli command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Protobufjs cli, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary `pbts` invoked JSDoc by building a shell command string from input file paths and executing it through `child_process.exec`. File paths containing shell metacharacters could therefore be interpreted by the shell instead of being passed to JSDoc as plain arguments. ## Impact An attacker who can control file names or paths passed to `pbts` may be able to execute arbitrary shell commands with the privileges of the process running `pbts`. This affects the protobufjs CLI tooling path. The protobufjs runtime APIs for encoding, decoding, parsing, and loading protobuf messages are not directly affected by this issue. ## Preconditions - The application or user must invoke `pbts` on file paths influenced by an attacker. - The attacker must be able to supply or create a path containing shell-significant characters. - The vulnerable `pbts` version must execute the generated JSDoc command through a shell. ## Workarounds Do not run affected versions of `pbts` on attacker-controlled file names or paths. If this cannot be avoided, sanitize or rename input files before invoking `pbts`, or run the CLI in an isolated environment with minimal privileges.

CVE-2026-42290 Affected Protobufjs cli Versions

2 component(s)
Fixed Versions:
1.2.12.0.2
Product / Package Ecosystem Affected Versions Fixed Version
protobufjs-cli
npm
< 1.2.1
1.2.1
protobufjs-cli
npm
≥ 2.0.0
< 2.0.2
2.0.2

References

Frequently Asked Questions

What is CVE-2026-42290?
CVE-2026-42290 is a security vulnerability in Protobufjs cli involving protobuf.js is Vulnerable to OS Command Injection in the CLI under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which Protobufjs cli versions are affected?
Affected versions include releases prior to 1.2.1, 2.0.2 across affected packages: protobufjs-cli.
What version fixes CVE-2026-42290?
Upgrading to 1.2.1, 2.0.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is protobufjs-cli affected?
Yes, protobufjs-cli is affected in releases prior to 1.2.1, 2.0.2. Upgrade your dependency to 1.2.1, 2.0.2 or later.
What is the CVSS score of CVE-2026-42290?
CVE-2026-42290 has a CVSS v3.1 base score of 7.8 (HIGH) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-42290?
CVE-2026-42290 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check npm dependencies for CVE-2026-42290?
Run the dependency tree command: 'npm ls protobufjs-cli'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-f84p-cvgm-xgjj",
  "modified" : "2026-05-14T20:31:52Z",
  "published" : "2026-05-12T14:59:45Z",
  "aliases" : [ "CVE-2026-42290" ],
  "summary" : "protobuf.js is Vulnerable to OS Command Injection in the CLI",
  "details" : "## Summary\n\n`pbts` invoked JSDoc by building a shell command string from input file paths and executing it through `child_process.exec`. File paths containing shell metacharacters could therefore be interpreted by the shell instead of being passed to JSDoc as plain arguments.\n\n## Impact\n\nAn attacker who can control file names or paths passed to `pbts` may be able to execute arbitrary shell commands with the privileges of the process running `pbts`.\n\nThis affects the protobufjs CLI tooling path. The protobufjs runtime APIs for encoding, decoding, parsing, and loading protobuf messages are not directly affected by this issue.\n\n## Preconditions\n\n- The application or user must invoke `pbts` on file paths influenced by an attacker.\n- The attacker must be able to supply or create a path containing shell-significant characters.\n- The vulnerable `pbts` version must execute the generated JSDoc command through a shell.\n\n## Workarounds\n\nDo not run affected versions of `pbts` on attacker-controlled file names or paths. If this cannot be avoided, sanitize or rename input files before invoking `pbts`, or run the CLI in an isolated environment with minimal privileges.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "protobufjs-cli"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.2.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.2.0"
    }
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "protobufjs-cli"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.0.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.0.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/protobufjs/protobuf.js/security/advisories/GHSA-f84p-cvgm-xgjj"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-42290"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/protobufjs/protobuf.js"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/protobufjs/protobuf.js/releases/tag/protobufjs-cli-v1.2.1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/protobufjs/protobuf.js/releases/tag/protobufjs-cli-v2.0.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-78" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-12T14:59:45Z",
    "nvd_published_at" : "2026-05-13T16:16:47Z"
  }
}