CVE-2019-10783: OS Command Injection in lsof

lsof Updated 02 Oct 2025

Summary

13/04/2021
No i
High
9.8

CVE-2019-10783: OS Command Injection in lsof. Affects lsof versions < 0.0.4. 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The lsof npm module is a package that provides a command-line tool and library for listing open files in Unix-like systems. It is commonly used to gather information about open files and the processes that opened them. The vulnerability in lsof allows for OS Command Injection, where user input is not properly sanitized and can be executed as a command on the underlying operating system. This can lead to unauthorized execution of arbitrary commands with the privileges of the user running the lsof module.

Vulnerability Detail

The vulnerability arises from the use of the exec function to parse user input in all exported methods of the lsof module. This allows an attacker to inject malicious commands by manipulating the user input. The impact of this vulnerability can be severe, as it enables unauthorized execution of arbitrary commands on the host system. An attacker could potentially gain full control over the system, leading to data breaches, privilege escalation, or disruption of services.

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 to prevent command injection. It is crucial to carefully validate and sanitize any user input that is passed to the lsof module. This can be done by using a combination of input validation techniques, such as whitelisting allowed characters and escaping or removing any potentially dangerous characters or sequences.

Conclusion

The lsof npm module is vulnerable to OS Command Injection, allowing for unauthorized execution of arbitrary commands. It is crucial to update to a patched version of the lsof module to mitigate this vulnerability. Additionally, implementing input validation and sanitization can serve as a temporary workaround. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for lsof →

Share this vulnerability

FAQ

The lsof npm module is used to list open files and the processes that opened them in Unix-like systems. It provides a command-line tool and library for this purpose.

OS Command Injection is a vulnerability that occurs when user input is not properly validated or sanitized and is executed as a command on the underlying operating system. This can lead to unauthorized execution of arbitrary commands with the privileges of the user running the vulnerable software.

The potential consequences of this vulnerability include unauthorized execution of arbitrary commands, data breaches, privilege escalation, and disruption of services. An attacker could gain full control over the system and perform malicious actions.

To fix this vulnerability, it is recommended to update the lsof module to a version that includes a patch for the command injection vulnerability. Updating to the latest version of lsof will ensure the vulnerability is mitigated.

As a temporary workaround, users can implement input validation and sanitization to prevent command injection. It is important to carefully validate and sanitize any user input that is passed to the lsof module.

Related vulnerabilities

Recent vulnerabilities recorded for lsof.

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