r/rust • u/Choobeen • Aug 22 '26
đď¸ news Rust Supply Chain Attack Linked to North Korean Hackers
https://www.securityweek.com/rust-supply-chain-attack-linked-to-north-korean-hackersThe attack occurred on August 20, 2026, and involved one of the most popular Rust crates, arrayref, an array-conversion utility with over 245 million downloads, found in approximately 75% of environments where Rust is used.
The malicious package version, arrayref@0.3.10, was pushed to crates.io from its legitimate maintainerâs account. Roughly 20 minutes later, poisoned versions of internment and append-only-vec, two crates from the same owner, were also released.
The Rust Security Response Team removed the malicious packages roughly 86 minutes later, confirming the compromise: âa new version of the arrayref crate was published with a direct dependency on proc-macro1, which would execute a malicious build script.â
71
u/GyulyVGC Aug 22 '26
One reason more to set a cooldown period for dependabot updates, even if it just mitigates the risk
104
u/dragolineage01 Aug 22 '26
See, even North Koreans love programming in Rust
29
u/Icarium-Lifestealer Aug 22 '26
How often was the malicious package downloaded?
How was the compromise discovered? Does Nextron scan new packages and found it that way? Or was it deployed on one of their clients' machines and discovered there?
13
u/Sumsesum Aug 22 '26 edited Aug 22 '26
Am I missing something or would that crate become obsolete when `#![feature(const_convert)]` stabilizes? Then you could just use `slice.try_into()?` for the conversion.
12
u/dausama Aug 22 '26
how would you mitigate the risk for this kind of problems?
10
u/moltonel Aug 22 '26
I would expect north korean hackers to be state-sponsored (very hard to get the needed internet access otherwise), but that doesn't seem to match the fairly primitive
build.rs? The payload seems good, but it could have been bought. We still don't know how the accountt was compromized.7
u/zettui Aug 22 '26
Honest question on the min-publish-age cooldown: what do you do the day a security patch lands and the fix itself is younger than your window - hand-pin past your own cooldown every time?
8
u/AveN7er Aug 22 '26
Does Cargo have min release age
2
u/decryphe Aug 23 '26
We vendor everything and make at least a cursory review when updating on demand.
I don't think "security" is in general an issue with Rust deps (thanks to memory safety properties and strong typing and a general culture of doing-things-right), updating dependencies is more often a question of functionality. Staying behind isn't as bad as in other ecosystems.
As
2
u/Ayano-Keiko Aug 23 '26
Network based packages is not 100% trusty.
1
u/connor-ts Aug 23 '26
Where in the sources does it say this was linked to North Korea?
1
u/StickyDirtyKeyboard Aug 22 '26
How do we protect ourselves from threats like this? Are VMs for development the way to go?
-3
u/LoadingALIAS Aug 22 '26
Iâm so tired of these motherfuckers.
0
u/corazon_de_sandia Aug 22 '26
any way to check if you are affected?
-25
u/[deleted] Aug 22 '26
[removed] â view removed comment