Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malicious @servers host with shell metacharacters
-
ExploitVictim runs scotty doctor command
-
ExecutionHost interpolated into shell string
-
ImpactInjected OS command executes as invoking user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK
2 techniques across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the attacker to control the 'host' value in a Scotty @servers configuration directive that a victim subsequently processes by invoking the Doctor command (checkSshConnectivity or checkRemoteTools in app/Commands/DoctorCommand.php up to v1.4.4). The host string is passed unescaped into Process::fromShellCommandline, so shell metacharacters (e.g., ';', '${IFS}') in the host break out and run arbitrary local commands. Limiting factors: this is a local developer CLI tool, so the attacker must get malicious config in front of the victim and the victim must run the doctor command (user interaction), rather than exploiting a live network service; the 'remotely' claim in the description is not supported by the code path. Injected commands run only with the privileges of the user executing Scotty. |
| Impact | The only quantified exploitation signals available are the vendor CVSS 4.0 base score of 5.3 (AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:L, E:X). There is no EPSS score, no CISA KEV listing, and no confirmed public exploit in the provided data, so this is not a confirmed-active-exploitation priority. The CWE-78 OS command injection is real and is corroborated by the vendor's own fix (PR #22), which replaces shell-string interpolation (Process::fromShellCommandline with an untrusted host) with an argv array - strong evidence the vulnerability class is genuine. However, several signals conflict: the description asserts 'It is possible to initiate the attack remotely,' yet Scotty is a local Laravel-Zero CLI tool whose vulnerable 'host' argument originates from a parsed @servers configuration directive, which points to local/config-controlled input rather than a network-facing service - verify the true attack vector with the vendor before treating AV:N as accurate. The vendor also rated impact low (VC/VI/VA:L), but a command injection normally yields full command execution in the invoking user's context, so the real technical impact is arguably higher than the vendor's conservative scoring. Net: a legitimate but likely lower-urgency issue whose realistic exploitation requires an attacker to control the server config a victim then processes. |
| Exploit ScenarioDerived | An attacker who can influence a Scotty @servers configuration entry (e.g., a shared, checked-in, or attacker-supplied config) sets a host value such as 'evil.example;touch${IFS}/tmp/pwned'. When a victim runs the 'doctor' command, checkSshConnectivity/checkRemoteTools interpolates that host into a shell command string, and the injected command executes locally under the victim's account. No public exploit code is identified, though the vendor's fix tests demonstrate the exact metacharacter payload style. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 18, 2026
OS command injection in the Spatie Scotty developer CLI (through v1.4.4) lets a malicious 'host' value in a Scotty @servers configuration directive break out of the local shell and execute arbitrary commands when a victim runs the Doctor command. Because the host string is interpolated unescaped into Process::fromShellCommandline, shell metacharacters such as ';' and '${IFS}' in a crafted host are interpreted by the local shell rather than passed literally to ssh. This is a local CLI tool, so exploitation requires the attacker to get malicious configuration in front of the victim and the victim to subsequently invoke Doctor (checkSshConnectivity or checkRemoteTools), and any injected commands run only with the victim's own user privileges; no public exploit code has been identified at time of analysis, and vendor CVSS 4.0 rates this 5.3 with current exploit maturity unproven (E:X).
RemediationAI
The primary fix is upstream PR #22 (https://github.com/spatie/scotty/pull/22), which replaces the shell-string invocation with an argv-array call - buildSshCommand() returning ['ssh','-o','ConnectTimeout=5','-o','BatchMode=yes',$host,$remoteCommand] passed to new Process(...) - so shell metacharacters in the host are never interpreted; note that this PR was still awaiting acceptance at time of analysis, so no released patched version is independently confirmed and users should track the repository for the merged, tagged release before upgrading. Until a fixed release is available, treat every host in @servers as untrusted input: do not run 'scotty doctor' against configuration files supplied by third parties, pull requests, or shared repositories, since simply viewing the file is safe but invoking Doctor triggers execution. As a compensating control, validate or allowlist @servers host entries (permitting only a safe pattern such as user@hostname/FQDN/IP) and reject any value containing shell metacharacters like ';', '&', '|', '$', '`', or '${IFS}'; these checks reduce exposure but can be bypassed by novel encodings, so they are not equivalent to the argv fix. Because injected commands execute with the privileges of the user running Scotty, running the tool under a low-privilege account or in a disposable container limits blast radius, at the cost of reduced convenience for legitimate checks.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Spatie Scotty is a PHP/Laravel-based developer CLI that reads a @servers directive from configuration and runs SSH-based connectivity and tool checks against each listed host. In app/Commands/DoctorCommand.php through v1.4.4, checkSshConnectivity and checkRemoteTools build a command string such as "ssh -o ConnectTimeout=5 -o BatchMode=yes {$host} 'echo ok'" and hand it to Symfony Process::fromShellCommandline, which executes the string through a local shell. The untrusted host value is interpolated directly, so a host containing shell metacharacters (for example 'evil.example;touch${IFS}/tmp/pwned', where ${IFS} substitutes for a space to survive the whitespace-delimited @servers parser) is interpreted by that shell and executes an attacker-chosen local command. The root cause is CWE-78 (Improper Neutralization of Special Elements used in an OS Command), i.e., constructing a shell command string from unescaped user-controlled input instead of using argument-array execution. The provided fix (PR #22) introduces a buildSshCommand() helper returning an argv array and switches to new Process(...), ensuring the host and remote command each remain a single literal argv element that no local shell can reinterpret.
Know when Scotty gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N
Attack is via a config file processed by a local CLI (AV:L) that a user must run (UI:R); successful command injection yields full command execution in the user's context (C/I/A:H).
Primary rating from Vendor (VulDB).
CVSS VectorVendor: VulDB
DescriptionCVE.org
A vulnerability was determined in spatie Scotty up to 1.4.4. This impacts the function DoctorCommand::checkSshConnectivity/DoctorCommand::checkRemoteTools of the file app/Commands/DoctorCommand.php of the component Doctor Command Handler. This manipulation of the argument host causes os command injection. It is possible to initiate the attack remotely. The pull request to fix this issue awaits acceptance.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
EUVD-2026-83045
GHSA-q246-734p-8872
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB