CVE-2024-24576: Rusts's `std::process::Command` did not properly escape arguments of batch files on Windows
Noroxi assessment
Priority: Plan (action score 46/100)
- Public proof-of-concept code exists (GitHub); there is no record of exploitation in the wild.
- Probability of exploitation in the next 30 days: 20.3% (FIRST EPSS); higher than 97.5% of all records.
- Anyone who can reach it over the internet can trigger it. No account or password is required. No user action is required. No special conditions are required; it is repeatable.
- According to CISA the attack is automatable: targets can be found by mass scanning.
- Fixed version: rust1.77 (openSUSE:Tumbleweed) 1.77.2-1.1.
Add it to your regular patch cycle. Upgrade to rust1.77 (openSUSE:Tumbleweed) 1.77.2-1.1 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
Rust is a programming language. The Rust Security Response WG was notified that the Rust standard library prior to version 1.77.2 did not properly escape arguments when invoking batch files (with the `bat` and `cmd` extensions) on Windows using the `Command`. An attacker able to control the arguments passed to the spawned process could execute arbitrary shell commands by bypassing the escaping. The severity of this vulnerability is critical for those who invoke batch files on Windows with untrusted arguments. No other platform or use is affected. The `Command::arg` and `Command::args` APIs state in their documentation that the arguments will be passed to the spawned process as-is, regardless of the content of the arguments, and will not be evaluated by a shell. This means it should be safe to pass untrusted input as an argument. On Windows, the implementation of this is more complex than other platforms, because the Windows API only provides a single string containing all the arguments to the spawned process, and it's up to the spawned process to split them. Most programs use the standard C run-time argv, which in practice results in a mostly consistent way arguments are splitted. One exception though is `cmd.exe` (used among other things to execute batch files), which has its own argument splitting logic. That forces the standard library to implement custom escaping for arguments passed to batch files. Unfortunately it was reported that our escaping logic was not thorough enough, and it was possible to pass malicious arguments that would result in arbitrary shell execution. Due to the complexity of `cmd.exe`, we didn't identify a solution that would correctly escape arguments in all cases. To maintain our API guarantees, we improved the robustness of the escaping code, and changed the `Command` API to return an `InvalidInput` error when it cannot safely escape an argument. This error will be emitted when spawning the process. The fix is included in Rust 1.77.2. Note that the new escaping logic for batch files errs on the conservative side, and could reject valid arguments. Those who implement the escaping themselves or only handle trusted inputs on Windows can also use the `CommandExt::raw_arg` method to bypass the standard library's escaping logic.
- Published
- Apr 9, 2024
- Updated
- Jun 17, 2026
- EPSS
- 20.3% · 97th percentile
- CWE
- CWE-78
Report tools
Action score
46
Plan
Add it to your regular patch cycle.
- CVSS
- 40 / 40 · 10.0 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 6 / 30 · 20.3%
CISA SSVC decision
- Exploitation
- proof of concept
- Automatable
- yes
- Technical impact
- total
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- 10.0
- CNA · GitHub_M
- 10.0
- agree
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- Proof of concept exists, no weaponized module
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| fedoraproject | fedora | cpe:2.3:o:fedoraproject:fedora |
| rust-lang | rust | cpe:2.3:a:rust-lang:rust |
| microsoft | windows | cpe:2.3:o:microsoft:windows |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- fedoraproject fedora38
- fedoraproject fedora39
- fedoraproject fedora40
- rust-lang rustbefore 1.77.2
Versions reported by the vendor
Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.
rust-lang rust
- < 1.77.2affected
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| openSUSE:Tumbleweed | rust1.77 | before 1.77.2-1.1 | 1.77.2-1.1 |
Same product
fedoraproject: all recordsOther highest-scoring records for the same primary product.
- CVE-2018-1111DHCP packages in Red Hat Enterprise Linux 6 and 7, Fedora 28, and earlier are vulnerable to a command injection flaw in the NetworkManager…59Plan
- CVE-2016-7167Multiple integer overflows in the (1) curl_escape, (2) curl_easy_escape, (3) curl_unescape, and (4) curl_easy_unescape functions in libcurl…43Plan
- CVE-2016-2173org.springframework.core.serializer.DefaultDeserializer in Spring AMQP before 1.5.5 allows remote attackers to execute arbitrary code.41Plan
Published before and after this one in the same product
- ← EarlierCVE-2021-30624Sep 3, 2021 · Chromium: CVE-2021-30624 Use after free in Autofill36Monitor
- ← EarlierCVE-2023-46841Mar 20, 2024 · x86: shadow stack vs exceptions from emulation stubs26Monitor
- Later →CVE-2024-38276Jun 18, 2024 · moodle: CSRF risks due to misuse of confirm_sesskey35Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| opensuse:rust1.77 | 1.77.2-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
Exploit status
Proof of concept available
A public proof of concept or detection signature exists. Exploit knowledge is out there; don't delay patching.
Evidence
- Proof-of-concept repository on GitHub ×8
Noroxi does not host or link to exploit code. Metasploit module names and Nuclei template ids are shown (names, not code); Exploit-DB entries and PoC repositories are given as counts only.
| Source | Kind | Date |
|---|---|---|
| Proof-of-concept repository on GitHub | stars:58 | 2024-04-09 |
| Proof-of-concept repository on GitHub | stars:9 | 2024-04-10 |
| Proof-of-concept repository on GitHub | stars:20 | 2024-04-10 |
| Proof-of-concept repository on GitHub | stars:1 | 2024-04-11 |
| Proof-of-concept repository on GitHub | stars:2 | 2024-04-14 |
| Proof-of-concept repository on GitHub | stars:0 | 2024-04-20 |
| Proof-of-concept repository on GitHub | stars:0 | 2024-04-21 |
| Proof-of-concept repository on GitHub | stars:0 | 2026-11-06 |
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
- First PoC-1 d
- Published
- TodayNov 11, 2026+946 d
No history yet (it accumulates with the daily EPSS job).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
No commit or PR link among the references.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
Impact can extend beyond the vulnerable component (scope changes).
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Changed
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-78 · Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
nvd-primary
Root cause
User input is inserted as text into a shell command. The shell may interpret special characters in the input as part of the command.
The bug in code
The whole CWE-78 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
const host = req.body.host;
exec("ping -c 1 " + host, onResult);Fixed
const host = req.body.host;
if (!/^[a-z0-9.-]{1,253}$/i.test(host)) return res.sendStatus(400);
execFile("ping", ["-c", "1", host], onResult);Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- Command Line Execution through SQL InjectionCAPEC-108likelihood: Low · Very High
- Command DelimitersCAPEC-15likelihood: High · High
- Exploiting Multiple Input Interpretation LayersCAPEC-43likelihood: Medium · High
- Argument InjectionCAPEC-6likelihood: High · High
- OS Command InjectionCAPEC-88likelihood: High · High
ATT&CK techniques
—
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (12 more)Show less
- doc.rust-lang.org/std/io/enum.ErrorKind.html#variant.InvalidInput
- doc.rust-lang.org/std/os/windows/process/trait.CommandExt.html#tymethod.raw_arg
- doc.rust-lang.org/std/process/struct.Command.html
- doc.rust-lang.org/std/process/struct.Command.html#method.arg
- doc.rust-lang.org/std/process/struct.Command.html#method.args
- github.com/rust-lang/rust/issues
- github.com/rust-lang/rust/security/advisories/GHSA-q455-m56c-85mh
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/N323QAEEUVTJ354BTVQ7UB6LYXUX2BCL/
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RPH3PF7DVSS2LVIRLW254VWUPVKJN46P/
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/W7WRFOIAZXYUPGXGR5UEEW7VTTOD4SZ3/
- www.rust-lang.org/policies/security
- www.kb.cert.org/vuls/id/123335
Vendor advisories and official records. Exploit/PoC links are deliberately left out.