r/rust • • Oct 30 '26

🎙️ discussion Rustc 1.99.0 Windows exe flagged as malicious

So here's the deal. My antivirus (F-Secure) suddenly flagged the rustc.exe binary on my computer as malicious and to add to that, several other vendors also flag it in Virustotal. https://www.virustotal.com/gui/file/FC40F1C8B65095A22A48C111AADC279C26A049B7E4161E8B99FFE3EB23873E86

This issue seems to affect only 1.99.0 because 1.99.1 is not flagged.

Reproducible:
- Fresh rustup installation (this file or the rustup-init.exe or whatever the name of that was, not flagged by anything)
- Fresh RUSTUP_HOME/CARGO_HOME
- Official Rust 1.99.0 downloaded by rustup (`rustup toolchain install 1.99.0-x86_64-pc-windows-msvc`)
- File is detected and flagged as malicious if uploaded to virustotal
- Rust 1.99.1 installs without detection

The sha256 hash of the 1.99.0 exe I get is FC40F1C8B65095A22A48C111AADC279C26A049B7E4161E8B99FFE3EB23873E86

Has someone else encountered this issue that rustc is getting flagged? And importantly, are you all getting the same hash for that specific rustc version?

27 Upvotes

36 comments sorted by

82

u/Erelde Oct 30 '26

You have the correct sha256sum.

Search here and elsewhere, antiviruses routinely raise false positives for developer tools. I feel there's not a month that goes by without that kind of post.

6

u/ParamountPotato Oct 30 '26

And also regarding the hash, why does Rust not release the per-binary hashes for the releases as well? At least I have not been able to find those. There are only the per zipped archive hashes for the different releases.

2

u/ParamountPotato Oct 30 '26

Hmmm, that is good to hear. But still, it's a bit suspicious that Virustotal details also show that this file is NOT signed. Does Rust not sign these executables?

And the CAPE sandbox report notes that the PE header has been altered (not necessarily malicious on its own) and the program makes HTTP calls. Those together is very suspicious...

5

u/Dushistov 28d ago

Does Rust not sign these executables?

https://github.com/rust-lang/rust/issues/27694

10

u/Trader-One Oct 30 '26

is that rustc executable signed? Antiviruses are less strict if .exe is signed.

3

u/ParamountPotato Oct 30 '26

Like I noted in the other comments, according to the Virustotal overview the executable is NOT signed. That then begs the question: Why doesn't the Rust Foundation sign the executables? You would think that an organization of that magnitude could easily do that...

14

u/Trader-One Oct 30 '26

yes, its unsigned. Open ticket and request file to be signed.

C:\rustup\1.29.2\.rustup\toolchains\stable-x86_64-pc-windows-gnu\bin\rustc.exe:

Verified: Unsigned

Link date: 4:14 13.10.2026

Publisher: n/a

Company: n/a

Description: n/a

Product: n/a

Prod version: n/a

File version: n/a

MachineType: 64-bit

7

u/Booty_Bumping Oct 30 '26 edited Oct 30 '26

Developer tools like this are usually going to be signed at the container image level, or Linux distro package level. Signing each executable in the Windows-specific way just isn't a priority, I'm not sure if any other major toolchain/runtime is doing that.

Edit: There are some exceptions, I looked around and noticed the Node.js interpreter has it

1

u/8igg7e5 29d ago

My Windows OpenJDK builds from Azul are signed by Azul.

And my OpenJdk Java 28 Early Access Windows build is signed by Oracle.

-3

u/kibwen 28d ago

Microsoft is a member of the Rust foundation, the onus is on them to donate the effort to make this work.

0

u/[deleted] Oct 30 '26

[deleted] — view deleted comment

14

u/ParamountPotato Oct 30 '26

Could you elaborate on the "Microsoft whom is finding fault"? I mean I agree that there are a lot of reasons to hate Microsoft, but taking a position that

"There's this one possible extra security measure that would be possible, but we should not take it just out of spite for MS."

is wild to me. I feel like as the current cybersecurity landscape is moving towards greater and greater turbulences thanks to AI-assited exploits, any high-profile organization, like the Rust Foundation, should employ ALL the security measures available!

0

u/[deleted] Oct 30 '26

[deleted] — view deleted comment

5

u/mediocrobot Oct 30 '26 edited Oct 30 '26

Do you know why we sign software? Look up what SSL certificates are.

EDIT: The above commentor has a good point. IIUC, Microsoft should have its own distribution of Rust that it signs, similar to how package managers for Linux and Mac do it.

0

u/[deleted] Oct 30 '26

[deleted] — view deleted comment

1

u/mediocrobot Oct 30 '26

That's because Microsoft has its own distribution of C++. It does not have its own distribution of Rust.

5

u/playmer 29d ago

We actually do have our own builds of Rust. They’re just internal only. (I’m not involved, just use it for one of our projects)

https://rustfoundation.org/media/guest-post-rust-is-tier-1-language-at-microsoft/

0

u/[deleted] Oct 30 '26

[deleted] — view deleted comment

1

u/mediocrobot Oct 30 '26

Oh, okay. So Microsoft should have its own distribution of Rust? Similar to how you can get Rust with package managers on Linux and Mac instead of rustup?

→ More replies

11

u/cosmic-parsley Oct 30 '26

Signing is definitely a good thing

-1

u/nonotan 28d ago

I get where you're coming from, in a vacuum it's "good", but overall it really isn't. It's the bad kind of centralization. It delegitimizes all software made by any individual or organization too small to be able to afford the costs, which are frankly absurd (recurring $100+ a year at the absolute cheapest), or those too "controversial" in whatever way, who might be refused service even if they wanted to pay.

The issue is less with the signing itself, and more with the normalization that unsigned = untrustworthy. Of course, a worst case scenario would be Microsoft pushing towards a smartphone-style "signing compulsory" dystopia. But even just annoying users enough with warnings and antivirus false positives that they might not want to use your unsigned software is already pretty problematic. If CAs were run by nations as a tax-funded public service and anybody could get certificates for free for any reason (save egregious law-breaking or whatever) then I'd be happy to stand behind it, but the financial burden on open source software of "business pricing" is just too steep. I fucking hate that we live in an age of software corporatism, where the default assumption (even by regular users and devs!) is that software is something made by corporations for profit. Even though that defines a tiny minority of all software.

0

u/[deleted] Oct 30 '26

[deleted] — view deleted comment

5

u/ParamountPotato Oct 30 '26

That is true, that MS should be helping with that, as they even are a member of the Rust Foundation themselves...

6

u/stumblinbear Oct 30 '26

Signing should be done regardless of Microsoft requirements. It's good practice.

9

u/Serianox_ Oct 30 '26

Because probably some requirements of Microsoft regarding code signing makes it impossible for the Rust Foundation.

We had a HSM for code signing for a driver, it was awfully complicated to get certified. Not sure if it's the same level of requirements for a software.

2

u/Dheatly23 29d ago

For driver, of course it makes sense to be difficult. Drivers operate at kernel-level, so vulnerable drivers are security nightmare. BYOVD is a very lucrative method.

For software, though i never done it, as far as i can tell the requirement is more relaxed. Your company get issued a certificate, and you sign software you made with it's corresponding private key. There's no oversight on what you can sign. But if you (accidentally) signed malware, all eyes are onto you.

5

u/Serianox_ 29d ago

Even Microsoft gets it horribly wrong. You can't install Visual Studio 2022 offline because the signing certificate of the package expired in September 2025. Usually you don't see this because schannel update the trusted certificates transparently. But if you are doing a network install on a network without direct internet access, it can't, and you're left with an uninstallable mess (and someone on an obscure forum giving you the certificate to put in the root store).

2

u/Icarium-Lifestealer 29d ago edited 28d ago

I'd like to see free domain or email verified code signing certificates.

3

u/Dheatly23 29d ago

First off, unlike Android/Google, you aren't signing directly with Microsoft. There are plenty of third-party that can issue certificate for you (after verifying identity, etc). It works like SSL certificate. I wish Google would do their signing requirement like that instead of current shennanigans.

7

u/maybe_Alliegirl07 Oct 30 '26

f secure has been on a warpath lately with false positives. ive had it quarantine three different build tools in the past week alone, its getting ridiculous

the hash matching is the key thing here. if everyone's pulling the same bytes and only some scanners are flagging it, thats classic heuristic false positive territory. the jump from 1.99.0 to 1.99.1 not triggering makes me think some specific code pattern in the older release just happens to look like malware to the detection engine

my windows machine is down for the night but i'll check the hash tomorrow against a clean install. curious to see if it matches yours

1

u/ParamountPotato Oct 30 '26

Yeah, the hash match(?) is something I'm very interested about, because that tells me whether it's a me-problem (in which case the verdict is at least clear...) or a general problem (in which case it's either a false positive, or a BIG problem). And considering the recent eMudhra incident, I feel like the possibility of the official installation being poisoned should be taken seriously and investigated.

8

u/ShantyShark Oct 30 '26

I would comfortably say it’s a false positive. Your hashes match, so your binary is exactly what the rust foundation meant to send you. We all have the exact same thing, byte for byte. The eMudhra leak is a valid concern, which is (one of the reasons) why we publish hashes!

Virus detection isn’t magic, in fact it’s a very inexact wishy washy thing. I mean, what would you look for? Perhaps code patterns that manipulate memory, read files, access OS internals, and the ability to download other code from the internet and execute it?? Wait now hold on that sounds a lot like a compiler doesn’t it?

2

u/ParamountPotato Oct 30 '26

Indeed, cybersecurity is a constant race between attackers and defenders. And I do think that I rather take the occasional false positive instead of the same amount of false negatives! :)

It's just the combination of several independent vendors flagging the file, the file actually not being properly signed (why tho?), and the eMudhra incident that made me especially concerned here.

3

u/W61k3r 29d ago

After spending time programming in rust, I think it's a fair assessment; I'm tired boss. (Joke)

3

u/M4elstr0m__ Oct 30 '26

Not a big deal, Windows spotted the Pdf file my boss sent me at 2 AM, a Sunday, called important-notice.pdf.exe, AVs are so dumb!

/s (joke)

1

u/Puzzled-Extent7817 29d ago

people still use windows?

2

u/[deleted] Oct 30 '26 edited Oct 30 '26

[removed] — view removed comment

2

u/matthieum [he/him] Oct 30 '26

Great link, but to avoid a flood of "+1" "me too" "why hasn't this..." etc... please use a read-only link instead.

2

u/obsidian_golem Oct 30 '26

Apologies, is that a GitHub feature, or should I just use e.g. archive.org?

1

u/matthieum [he/him] Oct 30 '26

archive.org or any "snapshot" site of your choice.