CVE-2024-3566
Command injection vulnerability in programing languages on Microsoft Windows operating system.
A command inject vulnerability allows an attacker to perform command injection on Windows applications that indirectly depend on the CreateProcess function when the specific conditions are satisfied.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
9.8
A command inject vulnerability allows an attacker to perform command injection on Windows applications that indirectly depend on the CreateProcess function when the specific conditions are satisfied.
- Record
CVE-2024-3566- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-77
- Updated
- 2026-11-02
CVE List
9.8
Command injection vulnerability in programing languages on Microsoft Windows operating system.
A command inject vulnerability allows an attacker to perform command injection on Windows applications that indirectly depend on the CreateProcess function when the specific conditions are satisfied.
- Record
CVE-2024-3566- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
EUVDEUVD-2024-32152
9.8
A command inject vulnerability allows an attacker to perform command injection on Windows applications that indirectly depend on the CreateProcess function when the specific conditions are satisfied.
- Record
EUVD-2024-32152- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-9xch-xvj3-fmf3
9.8
A command inject vulnerability allows an attacker to perform command injection on Windows...
A command inject vulnerability allows an attacker to perform command injection on Windows applications that indirectly depend on the CreateProcess function when the specific conditions are satisfied.
- Record
GHSA-9xch-xvj3-fmf3- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-77
- Updated
- 2026-11-02
OSV
9.8
Command injection vulnerability in programing languages on Microsoft Windows operating system.
A command inject vulnerability allows an attacker to perform command injection on Windows applications that indirectly depend on the CreateProcess function when the specific conditions are satisfied.
- Record
CVE-2024-3566- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVBIT-node-2024-3566 No score
Command injection vulnerability in programing languages on Microsoft Windows operating system.
A command inject vulnerability allows an attacker to perform command injection on Windows applications that indirectly depend on the CreateProcess function when the specific conditions are satisfied.
- Record
BIT-node-2024-3566- Updated
- 2026-11-02
OSVBIT-node-min-2024-3566 No score
Command injection vulnerability in programing languages on Microsoft Windows operating system.
A command inject vulnerability allows an attacker to perform command injection on Windows applications that indirectly depend on the CreateProcess function when the specific conditions are satisfied.
- Record
BIT-node-min-2024-3566- Updated
- 2026-11-02
OSVHSEC-2024-0003 No score
process: command injection via argument list on Windows
process: command injection via argument list on Windows
The process library on Windows is vulnerable to a command injection
vulnerability, via cmd.exe's interpretation of arguments. Programs that
invoke batch files (.bat, .cmd) and pass arguments whose values are
affected by program inputs may be affected.
This issue was discovered in many programming languages' Windows process execution behaviour. It was tracked by CERT/CC as VU#123335 and a coordinated disclosure was made on 2024-04-09 17:00 UTC.
A fix was released in process-1.6.19.0.
Background
Unlike POSIX systems, Windows does not have a mechanism for passing multiple arguments.Command line parsing is up to individual programs.
The process library defines the RawCommand constructor for specifying an
executable and its arguments:
data CmdSpec
= ShellCommand String
| RawCommand FilePath [String]
On Windows, the RawCommand executable name and arguments are serialised into
a single command line string, with separate arguments quoted separately.
process then invokes the Windows CreateProcess
routine with this command line string is given as the lpCommandLine
argument.
Issue
When executing .bat or .cmd files, CreateProcess
implicitly spawns cmd.exe. The System.Process command line construction
does not escape characters with special meaning to cmd.exe. As a
consequence, a command injection vulnerability arises when the following
conditions are satisfied:
- Program running on Windows
- Program executes a
.bator.cmdfile - The argument values include or are influenced by program input
Demonstration
The following batch file, test.bat, merely prints the executable name the
first two arguments (as interpreted by cmd.exe):
@ECHO OFF
ECHO 0: %0
ECHO 1: %1
ECHO 2: %2
PAUSE
The following Haskell program executes test.bat with basic string arguments.
The output is as expected:
λ> readProcess "test.bat" ["a","b"] [] >>= putStrLn
0: "test.bat"
1: "a"
2: "b"
However, we can use a close quote and the & character to induce cmd.exe to
execute a program named in the argument:
λ> readProcess "test.bat" ["\"&calc.exe"] [] >>= putStrLn
0: "test.bat"
1: "\"
2:
In addition to producing the above output, calc.exe is executed.
Mitigation
The lack of a general mechanism on Windows for safely conveying command line
arguments to programs increases the risk of this kind of security issue. The
fact that cmd.exe command line parsing is complex and poorly documented
exacerbates this issue, and also heightens the risk that the fix is
incomplete, or causes other issues.
If possible, avoid executing batch files where arguments include or are
influenced by untrusted program inputs. If it must be done, reject arguments
that include special characters including & and ".
Fix versions
process was modified to perform additional escaping and quoting
when executing .bat and .cmd files on Windows (ignoring
character case). The behaviour is unchanged in all other cases.
The fix was released in process-1.6.19.0. The following GHC releases were the first in their series to include a fixed version of the process library:
- GHC 9.10.1-alpha3 (released 2024-04-15)
- GHC 9.8.3 (released 2024-10-20)
- GHC 9.6.5 (released 2024-04-16)
Such a change in semantics should normally result in a major version bump. Because we expect very few (if any) users will be impacted by the behavioural change, the GHC team made a pragmatic decision to avoid the disruption that a major version bump would cause.
A follow-up fix was released in process-1.6.23.0 to handle batch
scripts with paths ending in whitespace and periods and
unescaped % expansions.
Acknowledgements
…
- Record
HSEC-2024-0003- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
nodeBitnami |
1.77.2 up to 18.19.0 | 18.19.0 |
node-minBitnami |
1.77.2 up to 18.20.5 | 18.20.5 |
processHackage |
1.0.0.0 up to 1.6.23.0, plus listed versions 1.0.1.11.0.1.21.0.1.31.0.1.41.0.1.5 Show 41 moreShow less1.1.0.01.1.0.11.1.0.21.2.0.01.2.1.01.2.2.01.2.3.01.3.0.01.4.0.01.4.1.01.4.2.01.4.3.01.5.0.01.6.0.01.6.1.01.6.10.01.6.11.01.6.12.01.6.13.01.6.13.11.6.13.21.6.14.01.6.15.01.6.16.01.6.17.01.6.18.01.6.19.01.6.2.01.6.20.01.6.21.01.6.22.01.6.3.01.6.4.01.6.5.01.6.5.11.6.6.01.6.7.01.6.8.01.6.8.11.6.8.21.6.9.0 |
1.6.23.0 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2024-3566 is a critical vulnerability (CVSS 9.8) in Go Programming Language Golang, published April 10, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 6.83%, the 94th percentile. Fixed in node 18.19.0.
References
flatt.tech/research/posts/batbadbut-you-cant-securely-execute-commands-on-windows
learn.microsoft.com/en-us/archive/blogs/twistylittlepassagesallalike/everyone-quotes-command-line-arguments-the-wrong-way
kb.cert.org/vuls/id/123335
cve.org/CVERecord?id=CVE-2024-24576
cve.org/CVERecord?id=CVE-2024-1874
cve.org/CVERecord?id=CVE-2024-22423
Show 7 moreShow less
github.com/nu11secur1ty/Windows11Exploits/tree/main/2024/CVE-2024-3566
nvd.nist.gov/vuln/detail/CVE-2024-3566
github.com/advisories/GHSA-9xch-xvj3-fmf3
github.com/CVEProject/cvelistV5/tree/main/cves/2024/3xxx/CVE-2024-3566.json
github.com/haskell/process/commit/3c419f9eeedac024c9dccce544e5a6fb587179a5
github.com/haskell/process/commit/951b02dd95559b1a26f2456bfb97cf740ea40934
github.com/haskell/process/commit/5fc91f5f36ed4479be2b95f04f264bb78ac8089d
Left out here: the rest of 1 source description. The JSON record has them.