By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
World of SoftwareWorld of SoftwareWorld of Software
  • News
  • Software
  • Mobile
  • Computing
  • Gaming
  • Videos
  • More
    • Gadget
    • Web Stories
    • Trending
    • Press Release
Search
  • Privacy
  • Terms
  • Advertise
  • Contact
Copyright © All Rights Reserved. World of Software.
Reading: Rust CVE-2024-24576 Explained: What Was This Security Advisory? | HackerNoon
Share
Sign In
Notification Show More
Font ResizerAa
World of SoftwareWorld of Software
Font ResizerAa
  • Software
  • Mobile
  • Computing
  • Gadget
  • Gaming
  • Videos
Search
  • News
  • Software
  • Mobile
  • Computing
  • Gaming
  • Videos
  • More
    • Gadget
    • Web Stories
    • Trending
    • Press Release
Have an existing account? Sign In
Follow US
  • Privacy
  • Terms
  • Advertise
  • Contact
Copyright © All Rights Reserved. World of Software.
World of Software > Computing > Rust CVE-2024-24576 Explained: What Was This Security Advisory? | HackerNoon
Computing

Rust CVE-2024-24576 Explained: What Was This Security Advisory? | HackerNoon

News Room
Last updated: 2026/01/31 at 12:43 PM
News Room Published 31 January 2026
Share
Rust CVE-2024-24576 Explained: What Was This Security Advisory? | HackerNoon
SHARE

The Rust Security Response WG was notified that the Rust standard library did not properly escape arguments when invoking batch files (with the bat and cmd extensions) on Windows using the Command API. 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 if you are invoking batch files on Windows with untrusted arguments. No other platform or use is affected.

This vulnerability is identified by CVE-2024-24576.

Overview

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 split.

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.

Mitigations

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 will be included in Rust 1.77.2, to be released later today.

If you implement the escaping yourself or only handle trusted inputs, on Windows you can also use the CommandExt::raw_arg method to bypass the standard library’s escaping logic.

Affected Versions

All Rust versions before 1.77.2 on Windows are affected, if your code or one of your dependencies executes batch files with untrusted arguments. Other platforms or other uses on Windows are not affected.

Acknowledgments

We want to thank RyotaK for responsibly disclosing this to us according to the Rust security policy, and Simon Sawicki (Grub4K) for identifying some of the escaping rules we adopted in our fix.

We also want to thank the members of the Rust project who helped us disclose the vulnerability: Chris Denton for developing the fix; Mara Bos for reviewing the fix; Pietro Albini for writing this advisory; Pietro Albini, Manish Goregaokar and Josh Stone for coordinating this disclosure; Amanieu d’Antras for advising during the disclosure.


The Rust Security Response WG

Also published here

Photo by K Adams on Unsplash

Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share This Article
Facebook Twitter Email Print
Share
What do you think?
Love0
Sad0
Happy0
Sleepy0
Angry0
Dead0
Wink0
Previous Article Govee Permanent Outdoor Lights Prism Review: Get the coolest lights on the market Govee Permanent Outdoor Lights Prism Review: Get the coolest lights on the market
Next Article Here’s my one Apple Watch feature request for watchOS 27 – 9to5Mac Here’s my one Apple Watch feature request for watchOS 27 – 9to5Mac
Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected

248.1k Like
69.1k Follow
134k Pin
54.3k Follow

Latest News

SpaceX wants to put 1 million solar-powered data centers into orbit
SpaceX wants to put 1 million solar-powered data centers into orbit
News
Keep Your Hands Warm With These Toasty Touchscreen Gloves
Keep Your Hands Warm With These Toasty Touchscreen Gloves
Gadget
Apple's New Lip-Reading Tech Is a Weird Signal of Where We're Heading
Apple's New Lip-Reading Tech Is a Weird Signal of Where We're Heading
News
Nvidia CEO pushes back against report that his company’s 0B OpenAI investment has stalled |  News
Nvidia CEO pushes back against report that his company’s $100B OpenAI investment has stalled | News
News

You Might also Like

Phosh Mobile Phone UI Making Progress On GTK4 Port
Computing

Phosh Mobile Phone UI Making Progress On GTK4 Port

1 Min Read
Bitcoin Price Prediction 2026: 0,000 Target and the Next Crypto to Explode in This Cycle | HackerNoon
Computing

Bitcoin Price Prediction 2026: $300,000 Target and the Next Crypto to Explode in This Cycle | HackerNoon

9 Min Read
Godot 4.4: Metal Rendering Backend, 3D Physics Interpolation, and More | HackerNoon
Computing

Godot 4.4: Metal Rendering Backend, 3D Physics Interpolation, and More | HackerNoon

12 Min Read
Astounding Stories of Super-Science, March, 1932 – Table of Links | HackerNoon
Computing

Astounding Stories of Super-Science, March, 1932 – Table of Links | HackerNoon

1 Min Read
//

World of Software is your one-stop website for the latest tech news and updates, follow us now to get the news that matters to you.

Quick Link

  • Privacy Policy
  • Terms of use
  • Advertise
  • Contact

Topics

  • Computing
  • Software
  • Press Release
  • Trending

Sign Up for Our Newsletter

Subscribe to our newsletter to get our newest articles instantly!

World of SoftwareWorld of Software
Follow US
Copyright © All Rights Reserved. World of Software.
Welcome Back!

Sign in to your account

Lost your password?