CVE-2026-51190
9.8Serverless-Devs · Serverless-Devs (s)
The Serverless-Devs command line tool is vulnerable to OS command injection via the s init command, which fails to sanitize user input before passing it to an underlying shell process.
Executive summary
A critical OS command injection vulnerability exists in Serverless-Devs versions 3.1.11 and earlier, potentially allowing unauthenticated remote attackers to execute arbitrary code on the host system.
Vulnerability
The s init command improperly sanitizes user-supplied input before passing it to child_process.spawn with shell enabled. An unauthenticated attacker can bypass existing validation by providing a URL that ends in .git, resulting in arbitrary OS command execution.
Business impact
This vulnerability carries a CVSS score of 9.8, indicating a critical severity level due to the potential for full system compromise. Successful exploitation grants an attacker the ability to execute arbitrary commands with the privileges of the user running the tool, leading to total loss of confidentiality, integrity, and availability. Such an impact could result in unauthorized data exfiltration, the deployment of malicious software, or significant operational downtime.
Remediation
Immediate Action: Users should immediately restrict the execution of the s init command and avoid processing untrusted git repository URLs until a security patch is provided by the vendor.
Proactive Monitoring: Security teams should monitor system logs for suspicious process execution patterns originating from the serverless-devs tool, specifically looking for unexpected shell commands or network connections.
Compensating Controls: Implement strict environment controls to ensure the tool is only executed within isolated, non-privileged environments or containers to minimize the blast radius of a potential command injection.
Exploitation status
Public Exploit Available: Yes, a public proof-of-concept exists as documented in the linked GitHub Gist.
Analyst recommendation
Given the critical nature of this flaw and the availability of a public proof-of-concept, users must treat this as a high-priority risk. Organizations should transition to secure alternatives or apply strict input validation at the pipeline level until the vendor releases a patched version of Serverless-Devs. Failure to address this vulnerability exposes infrastructure to remote code execution and full system takeover.