CVE-2019-10778: OS Command Injection in devcert-sanscache
Summary
CVE-2019-10778: OS Command Injection in devcert-sanscache. Affects devcert-sanscache versions < 0.4.7. Fixed in 0.4.7. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
devcert-sanscache is an npm package that provides functionality for managing SSL/TLS certificates. It is used to generate and store self-signed certificates for local development environments. The package is vulnerable to an OS Command Injection attack, which allows remote attackers to execute arbitrary code or cause a Command Injection. The vulnerability arises from the lack of sanitization of user-controlled input, specifically the commonName variable used in the exec function.
Vulnerability Detail
The OS Command Injection vulnerability in devcert-sanscache allows an attacker to execute arbitrary commands on the target system. By manipulating the commonName input, an attacker can inject malicious commands that will be executed by the exec function without proper sanitization. This can lead to unauthorized access, data leakage, or even complete compromise of the affected system. The severity of this vulnerability is rated as CRITICAL with a CVSS score of 9.8.
How To Fix
Latest published version: 0.5.1 as of 22 Oct 2026
npm install devcert-sanscache@0.5.1
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
0.4.7
This is the first release that contains the fix.
npm install devcert-sanscache@0.4.7
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If updating to the latest version is not feasible, a possible workaround is to manually sanitize the commonName input before passing it to the exec function. This can be done by validating and sanitizing the input to ensure it only contains expected characters and does not include any malicious commands. Here is an example of how to sanitize the input using JavaScript:
const commonName = sanitizeInput(userInput);
exec(`command --option ${commonName}`);
Conclusion
The OS Command Injection vulnerability in devcert-sanscache can have severe consequences, allowing remote attackers to execute arbitrary code on the affected system. It is crucial to update to the latest version of the package (0.4.7 or later) to mitigate this vulnerability. If you require further assistance or support in addressing this vulnerability, please contact DevNack.com.
See every vulnerability recorded for devcert-sanscache →
FAQ
devcert-sanscache is an npm package used for managing SSL/TLS certificates in local development environments. It provides functionality for generating and storing self-signed certificates.
OS Command Injection is a type of vulnerability where an attacker can execute arbitrary commands on the target system by injecting malicious input that is not properly sanitized.
The impact of this vulnerability can be severe, as it allows remote attackers to execute arbitrary code on the affected system. This can lead to unauthorized access, data leakage, or complete compromise of the system.
To fix this vulnerability, it is recommended to update devcert-sanscache to version 0.4.7 or later. This version includes the necessary fixes to prevent OS Command Injection attacks.
If updating to the latest version is not feasible, a possible workaround is to manually sanitize the user input before passing it to the vulnerable function. This can help mitigate the risk of OS Command Injection.