Command Injection Vulnerability in php-shellcommand Package

php-shellcommand Updated 02 Oct 2025

Summary

30/12/2019
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2019-10774: php-shellcommand versions before 1.6.1 have a command injection vulnerability. Successful exploitation could lead to arbitrary code execution. Affects php-shellcommand versions < 1.6.1-1. Fixed in 1.6.1-1. 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

The php-shellcommand package is a PHP library that allows users to execute shell commands from within PHP scripts. It is commonly used in web applications to perform system-level operations. However, versions prior to 1.6.1 are susceptible to a command injection vulnerability, which can be exploited by attackers to execute arbitrary commands on the server, potentially compromising the entire system.

Vulnerability Detail

The vulnerability arises from improper handling of user input, allowing attackers to inject malicious commands into the shell execution context. This can lead to arbitrary code execution, where an attacker can run any command on the server with the same privileges as the web server user. The risk is particularly high in environments where the web server has elevated privileges, making it crucial for users of the php-shellcommand package to address this issue promptly.

How To Fix

Minimum fixed version

1.6.1-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade php-shellcommand

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If immediate updating is not possible, consider sanitizing user inputs to prevent command injection. This can be done by validating and escaping inputs before passing them to the shell command execution functions. For example, use PHP's escapeshellarg() function to escape any arguments passed to the shell command.

Conclusion

The command injection vulnerability in the php-shellcommand package poses a significant risk to applications using versions prior to 1.6.1. It is essential to update to the latest version to safeguard against potential exploitation. Additionally, implementing input validation can help mitigate risks in the interim.

See every vulnerability recorded for php-shellcommand →

Share this vulnerability

FAQ

The php-shellcommand package is a PHP library that allows the execution of shell commands from PHP scripts, enabling developers to perform system-level operations.

A command injection vulnerability allows an attacker to execute arbitrary commands on a server by injecting malicious input into a command execution context.

You can use Vulert, which monitors open-source vulnerabilities in your software. By uploading your manifest file like package-lock.json, you can check for vulnerabilities without needing to access the code.

Failing to fix this vulnerability can lead to unauthorized access, data breaches, and complete system compromise, especially if the web server has elevated privileges.

Yes, you can sanitize user inputs to prevent command injection by validating and escaping inputs before executing shell commands.

Related vulnerabilities

Recent vulnerabilities recorded for php-shellcommand.

How To Fix

Minimum fixed version

1.6.1-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade php-shellcommand

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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