CVE-2021-34082: OS Command Injection in proctree

proctree Updated 02 Oct 2025

Summary

03/06/2022
No i
High
Not published

CVE-2021-34082: OS Command Injection in proctree. Affects proctree versions < 0.1.1. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

proctree is an npm package that provides a tree-like representation of running processes in Node.js. It allows users to inspect and manipulate process trees programmatically. However, a vulnerability has been discovered in versions up to 0.1.1 and commit 0ac10ae575459457838f14e21d5996f2fa5c7593, which can be exploited by attackers to execute arbitrary commands through the fix function.

Vulnerability Detail

The OS Command Injection vulnerability in proctree arises due to insufficient input validation. Attackers can craft malicious input that includes arbitrary commands, which are then executed by the application. This can lead to unauthorized access, data leakage, or even complete compromise of the system. The vulnerability has been assigned a severity rating of HIGH and is categorized under CWE-78.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, users can implement input validation and sanitization in their code to prevent the execution of arbitrary commands. It is crucial to carefully validate any user-supplied input and ensure that it does not contain any malicious commands. Here is an example of how input validation can be implemented in Node.js:

const { exec } = require('child_process');

function sanitizeInput(input) {
  // Implement your input validation logic here
  return input;
}

function fix(data) {
  const sanitizedData = sanitizeInput(data);
  exec(`proctree fix ${sanitizedData}`, (error, stdout, stderr) => {
    // Handle the command execution and output
  });
}

Conclusion

In conclusion, the OS Command Injection vulnerability in proctree can be exploited by attackers to execute arbitrary commands on the affected system. It is crucial to update to a non-affected version of the package and implement proper input validation to prevent the execution of malicious commands. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for proctree →

Share this vulnerability

FAQ

The vulnerability allows attackers to execute arbitrary commands on the affected system. This can lead to unauthorized access, data leakage, or complete compromise of the system.

Versions up to 0.1.1 and commit 0ac10ae575459457838f14e21d5996f2fa5c7593 are affected by this vulnerability.

Yes, updating to a version of proctree that is not affected by the vulnerability will resolve the issue. Users should update to the latest version of the package.

Implementing input validation and sanitization in the code can help mitigate the vulnerability temporarily. Carefully validate user-supplied input to prevent the execution of arbitrary commands.

You can find more information about this vulnerability in the advisory published on the GitHub Security Advisory Database.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback