CVE-2024-43402 | Rust OS Command Injection/Argument Injection vulnerability

Rust is a programming language. The fix for CVE-2024-24576, where `std::process::Command` incorrectly escaped arguments when invoking batch files on Windows, was incomplete. Prior to Rust version 1.81.0, it was possible to bypass the fix when the batch file name had trailing whitespace or periods (which are ignored and stripped by Windows). To determine whether to apply the `cmd.exe` escaping rules, the original fix for the vulnerability checked whether the command name ended with `.bat` or `.cmd`. At the time that seemed enough, as we refuse to invoke batch scripts with no file extension. Windows removes trailing whitespace and periods when parsing file paths. For example, `.bat. .` is interpreted by Windows as `.bat`, but the original fix didn't check for that. Affected users who are using Rust 1.77.2 or greater can remove the trailing whitespace (ASCII 0x20) and trailing periods (ASCII 0x2E) from the batch file name to bypass the incomplete fix and enable the mitigations. Users are affected if their code or one of their dependencies invoke a batch script on Windows with trailing whitespace or trailing periods in the name, and pass untrusted arguments to it. Rust 1.81.0 will update the standard library to apply the CVE-2024-24576 mitigations to all batch files invocations, regardless of the trailing chars in the file name.

Published: 2024-09-04 Last update: 2024-10-01 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2024-43402 is rated Moderate Risk (55.9/100): CVSS High severity, with medium exploitation likelihood (EPSS 0.51%). Mandatory action: Review affected assets and schedule remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2024-43402

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-03-04 0.14% 0.51% +0.37%
2 2026-03-01 0.51% 0.14% -0.37%
3 2026-02-04 0.51%

Full EPSS history (41 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2024-43402

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
8.1 3.1 HIGH
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:C)
Breaking this can reach past the original component and bite other resources—bigger blast radius.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
1.4 6.0 [email protected]
8.8 3.1 HIGH
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:C)
Breaking this can reach past the original component and bite other resources—bigger blast radius.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
2.0 6.0 [email protected]

Weakness enumeration for CVE-2024-43402

OS Trackers for CVE-2024-43402

vendor priority summary link
alpine high CVE-2024-43402: 1 source package rows (rust); 46 state rows across 6 repos (3.19-main, 3.20-main, 3.21-main, 3.22-main, edge-community, edge-main); fixed 0, open 46. https://security.alpinelinux.org/vuln/CVE-2024-43402
debian unimportant CVE-2024-43402 unimportant priority: Debian including 1 source packages (rustc), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. https://security-tracker.debian.org/tracker/CVE-2024-43402
redhat high https://access.redhat.com/security/cve/CVE-2024-43402
ubuntu medium CVE-2024-43402 medium priority: Ubuntu including 2 source packages (cargo, rustc), 13 status rows across 7 suites (bionic, focal, jammy, noble, trusty, upstream, xenial): not-affected 11, DNE 1, needs-triage 1. https://ubuntu.com/security/CVE-2024-43402

Affected software / configurations for CVE-2024-43402

Vendor Product Version Raw CPE
rust-lang rust < 1.81.0 cpe:2.3:a:rust-lang:rust:*:*:*:*:*:*:*:*

References for CVE-2024-43402

cvelogic Threat Intelligence