CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-VGR2-R5HM-F6GF
10.0

SHA-RST: The Silent Assassin in Your Cargo.toml

Alon Barad
Alon Barad
Software Engineer

Feb 13, 2026·4 min read·8 visits

Active Exploitation

Executive Summary (TL;DR)

Malicious Rust crate 'sha-rst' (and its parent 'finch_cli_rust') caught stealing SSH keys and AWS credentials. It used dependency nesting to hide the payload. If you installed it, rotate everything.

A deep dive into the 'sha-rst' malicious crate, a textbook example of modern supply chain warfare targeting the Rust ecosystem. This package masqueraded as a utility library but served as a nested payload carrier for a typo-squatting campaign, exfiltrating developer credentials immediately upon installation.

The Hook: Not a Hashing Library

In the world of open-source development, names matter. We trust names like openssl, requests, and tokio. When you see a crate named sha-rst in your dependency tree, your brain likely autocorrects it to 'SHA (Secure Hash Algorithm) for Rust'. It sounds boring. It sounds foundational. It sounds safe.

That psychological blind spot is exactly what the threat actor behind sha-rst was banking on. Released on December 8, 2025, this crate wasn't a hashing library at all. It was a digital syringe loaded with credential-stealing malware, designed to slip past your mental firewall and into your build pipeline.

Unlike a typical vulnerability where a developer makes a mistake (a buffer overflow or a logic error), this was a deliberate, weaponized component. It didn't have a bug; it was the bug. It serves as a grim reminder that in the supply chain, you aren't just importing code; you're importing the author's intentions.

The Trap: Matryoshka Doll Dependencies

The brilliance of this attack wasn't the code itself—it was the delivery mechanism. The attacker didn't just upload sha-rst and hope people would download it. They used a technique known as Dependency Nesting combined with Typosquatting.

The primary lure was a crate named finch_cli_rust. This was designed to mimic the legitimate finch_cli tool. If a developer mistyped the name or was misled by a search result, they pulled in the malicious finch_cli_rust.

Here is where it gets clever. finch_cli_rust didn't contain the malicious logic directly. If a security researcher or an automated scanner glanced at the top-level crate, it might look relatively benign—perhaps just a wrapper. But inside its Cargo.toml, it defined a dependency on sha-rst. The moment cargo build resolved the tree, sha-rst was pulled in, and the trap was sprung. It's a Matryoshka doll of malice: a fake CLI hiding a fake library hiding a real exploit.

The Payload: Credential Vacuum

So, what did sha-rst actually do? It didn't mine crypto, and it didn't ransom files. It went for the highest-value targets on a developer's machine: identity.

Analysis by the RustSec team and researcher Matthias Zepper revealed that the crate contained code specifically designed to hunt for standard credential paths. It targeted:

  • SSH Keys: ~/.ssh/id_rsa, ~/.ssh/id_ed25519
  • Cloud Credentials: ~/.aws/credentials, ~/.aws/config
  • Environment Variables: Scanned for strings like KEY, TOKEN, SECRET

The implementation likely utilized Rust's std::fs to recursively walk these directories and std::net (or a bundled HTTP client) to exfiltrate the data. This wasn't a complex ROP chain; it was a smash-and-grab robbery implemented in safe, stable Rust code.

The Execution: Pwned at Build Time

The most dangerous aspect of Rust malware is the build.rs script. In Rust, a crate can define a build script that compiles and executes before the main application is built. This is intended for compiling C dependencies or generating code, but for an attacker, it's a blank check for Remote Code Execution (RCE).

While the specific execution method for sha-rst (whether it used build.rs or a runtime initializer) ensures that the malware runs automatically, the effect is immediate. You don't need to import the library in your code. You don't need to call a function. You just need to type:

cargo build

Or even just let your IDE auto-index dependencies. In the background, sha-rst compiles, executes, reads your ~/.ssh directory, and sends your private keys to an attacker-controlled endpoint. By the time the compiler finishes, your digital identity is already being sold or used to pivot into your company's infrastructure.

The Aftermath: Scorched Earth

This crate was live for roughly 24 hours before being nuked from crates.io on December 9, 2025. It had 22 downloads. That's a small number in the grand scheme of things, but in security, we don't count downloads; we count potential impact.

If you were one of those 22 unfortunates, or if you are reading this because you found sha-rst in a legacy Cargo.lock file, there is no 'patching'. You cannot fix this. Your machine is compromised. The only remediation is a Scorched Earth policy.

Every credential on that machine is burned. Your SSH keys? Revoke them. Your AWS keys? Rotate them. Your GitHub PATs? Delete them. The persistence of the attacker is unknown, so the safest path is to wipe the machine and start over. This is the cost of a single typo in a modern development environment.

Official Patches

RustSecRustSec Advisory

Technical Appendix

CVSS Score
10.0/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Affected Systems

Rust Development EnvironmentsCI/CD Pipelines running 'cargo build'Systems with 'finch_cli_rust' installed

Affected Versions Detail

Product
Affected Versions
Fixed Version
sha-rst
crates.io
>= 0.1.0Removed
finch_cli_rust
crates.io
>= 0.0.0Removed
AttributeDetail
Attack VectorSupply Chain / Typosquatting
ImpactCredential Exfiltration
CWE IDCWE-506
SeverityCritical
Exploit StatusActive / Weaponized
PlatformRust / crates.io
PayloadInfo Stealer

MITRE ATT&CK Mapping

T1195.001Supply Chain Compromise
Initial Access
T1555Credentials from Password Stores
Credential Access
T1041Exfiltration Over C2 Channel
Exfiltration
CWE-506
Embedded Malicious Code

The product contains code that appears to be malicious in nature.

Known Exploits & Detection

RustSecAdvisory confirming malware payload

Vulnerability Timeline

Malicious crate 'sha-rst' published to crates.io
2025-12-08
Malicious behavior identified by Matthias Zepper
2025-12-09
Crate removed from crates.io registry
2025-12-09
Official GitHub Advisory Published
2026-02-12

References & Sources

  • [1]GitHub Advisory GHSA-vgr2-r5hm-f6gf
  • [2]RustSec Advisory 2025-0151

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.