CVE-2026-51190 Details
Description
The "s init" command in Serverless-Devs @serverless-devs/s <= 3.1.11 passes unsanitized user input to child_process.spawn() with shell: true. A URL ending in ".git" bypasses the only input check, allowing OS command injection when a user runs "s init" with an attacker-controlled argument.
A command injection vulnerability has been identified in the Serverless-Devs CLI tool, specifically in the '@serverless-devs/s' package, versions through 3.1.11. The issue arises in the 's init' command, which passes unsanitized user input to 'child_process.spawn()' with 'shell: true'. This allows for OS command injection, particularly with URLs ending in '.git', by exploiting the input validation bypass. The vulnerability is significant in Kubernetes CI/CD environments where the CLI runs in a pod with a mounted service account token, potentially leading to token theft and unauthorized access to the Kubernetes API, depending on the token's RBAC permissions.
Remove 'shell: true' from the 'spawn' call in the 'src/command/init/manager.ts' file. Without this option, Node.js will pass user input directly to the 'git' command without interpreting it as shell syntax, eliminating the command injection risk.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Aug 3, 2026CISA-ADP
Assessed Aug 6, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://gist.github.com/j311yl0v3u/5600afea3bea1337805c2e335bd4ae8e | CISA-ADP | ExploitTechnical Analysis |
| https://gist.github.com/j311yl0v3u/5600afea3bea1337805c2e335bd4ae8e | [email protected] | ExploitTechnical Analysis |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | CISA-ADP |
Affected Products
| Product | Versions |
|---|---|
| Serverless-Devs Serverless-Devs | <= 3.1.11 (semver) |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Aug 6, 2026 | CVE Modified | CISA-ADP |
| Aug 3, 2026 | New CVE Received | [email protected] |
Volerion