CVE-2026-42290: protobufjs-cli: OS Command Injection

Published May 12, 2026
·
Updated

Summary

pbts invoked JSDoc by building a shell command string from input file paths and executing it through childprocess.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.

Other sources

protobufjs-cli is the command line add-on for protobuf.js. Prior to 1.2.1 and 2.0.2, pbts invoked JSDoc by building a shell command string from input file paths and executing it through childprocess.exec. File paths containing shell metacharacters could therefore be interpreted by the shell instead of being passed to JSDoc as plain arguments. This vulnerability is fixed in 1.2.1 and 2.0.2.

MITRE

Affected Software

4 affected componentsFixes available
npm/protobufjs-cli>=2.0.0<=2.0.1
2.0.2
npm/protobufjs-cli<=1.2.0
1.2.1
Protobufjs Project Protobufjs-cli Node.js<1.2.1
Protobufjs Project Protobufjs-cli Node.js>=2.0.0<2.0.2

Event History

May 12, 2026
Advisory Published
via GitHub·02:59 PM
Data Sourced
via GitHub·02:59 PM
DescriptionSeverityWeaknessAffected Software
May 13, 2026
CVE Published
via MITRE·02:49 PM
Data Sourced
via MITRE·02:49 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·04:16 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·04:16 PM
Affected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-42290?

The severity is classified as medium due to the potential for command injection attacks.

2

How do I fix CVE-2026-42290?

You can mitigate CVE-2026-42290 by upgrading to protobufjs-cli version 1.2.1 or 2.0.2.

3

What types of systems are affected by CVE-2026-42290?

CVE-2026-42290 affects systems that use protobufjs-cli versions below 2.0.2 and 1.2.1.

4

What attack vectors are associated with CVE-2026-42290?

The attack vector involves exploiting file paths with shell metacharacters in scripts utilizing child_process.exec.

5

Can user input lead to vulnerabilities in CVE-2026-42290?

Yes, unvalidated user input can lead to command injection due to improper handling of file paths.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203