CVE-2024-43402
Last modified
CVE-2024-43402 is a high-severity vulnerability rated 8.8/10 on the CVSS scale. 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. EPSS estimates a 0.74% chance of exploitation in the next 30 days.
Description
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.
Metrics
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Weakness Enumeration
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Rust-Lang | Rust | < 1.81.0 |
References
- https://blog.rust-lang.org/2024/04/09/cve-2024-24576.htmlVendor Advisory
- https://github.com/rust-lang/rust/security/advisories/GHSA-2xg3-7mm6-98jjMitigation, Third Party Advisory
Timeline
- Published
- Last Modified
- Status
- Analyzed
Frequently Asked Questions
What is CVE-2024-43402?
How severe is CVE-2024-43402?
How do I fix CVE-2024-43402?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2024
- CVE-2024-43397Apollo is a configuration management system. A vulnerability…4.3
- CVE-2024-43398REXML is an XML toolkit for Ruby. The REXML gem before 3.3.6…5.9
- CVE-2024-43399Mobile Security Framework (MobSF) is a pen-testing, malware …9.8
- CVE-2024-4340Passing a heavily nested list to sqlparse.parse() leads to a…7.5
- CVE-2024-43400XWiki Platform is a generic wiki platform offering runtime s…5.4
- CVE-2024-43401XWiki Platform is a generic wiki platform offering runtime s…8
- CVE-2024-43403Kanister is a data protection workflow management tool. The …8.8
- CVE-2024-43404MEGABOT is a fully customized Discord bot for learning and f…9.8
- CVE-2024-43405Nuclei is a vulnerability scanner powered by YAML based temp…7.8
- CVE-2024-43406LF Edge eKuiper is a lightweight IoT data analytics and stre…8.8
- CVE-2024-43407CKEditor4 is an open source what-you-see-is-what-you-get HTM…6.1
- CVE-2024-43408Discourse Placeholder Forms will let you build dynamic docum…6.3
Are you affected by CVE-2024-43402?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
