Poisoned Rust Crates Execute Malware at Build Time: 245 Million Downloads Hit in Supply-Chain Attack
Developers running cargo build may have unknowingly executed malicious code that downloaded remote payloads, installed persistent backdoors, and began stealing browser-saved passwords. The attack, discovered on August 20, targeted three popular Rust crates on crates.io: arrayref 0.3.10, internment 0.8.7, and append-only-vec 0.1.9.
All three releases added a dependency on the typosquatted package proc-macro1 instead of the legitimate proc-macro2. Because the malicious crate copied legitimate code, compilation succeeded without errors. The hidden build script reassembled a C2 address from base64 fragments, disabled TLS verification, and downloaded platform-specific payloads to /tmp/rust-setup on Linux/macOS or via hidden PowerShell/VBScript on Windows.
Scale of the arrayref compromise
arrayref has recorded 245,385,500 cumulative downloads, including 53.9 million in the last 90 days. It sits in the dependency chain of widely used crates such as winit → sctk-adwaita → tiny-skia → arrayref. Attackers yanked versions 0.3.5 through 0.3.9 within the same minute the malicious 0.3.10 was published, forcing Cargo to recommend the poisoned release.
North Korean infrastructure overlap
Analysis by Wiz revealed infrastructure reuse with earlier npm and axios supply-chain attacks attributed by Microsoft to Sapphire Sleet and by Google Threat Intelligence to MIDNIGHT NEPTUNE. The C2 server at 23.254.165.112 and domain hwsrv-798836.hostwindsdns.com match prior campaigns. Second-stage malware queries Chrome, Brave, and Edge SQLite login databases and persists via systemd user services, LaunchAgents, or registry Run keys.
Systemic weaknesses in Cargo
- No mandatory publish cooldown; the global-min-publish-age PR remained unmerged at the time of the attack.
- Single-owner accounts without enforced 2FA; the sole maintainer of arrayref registered in 2009.
- Abuse of the yank mechanism to remove legitimate versions and steer users toward the malicious release.
RustSec and crates.io administrators removed the malicious versions within 86–107 minutes. Developers are advised to inspect ~/.cargo/registry/cache for the poisoned crate files, verify absence of /tmp/rust-setup and related scripts, and pin arrayref to version 0.3.9 or earlier.
Related articles
Malicious ZIP Archive Delivers Git-Based Remote Code Execution via Hooks and Filters
A developer received a fake job offer from Cryptic Heaven through LinkedIn, leading to a ZIP file containing a rigged Git repository. The archive included a pre-configured .git directory with altered hooksPath pointing to .git/objects/interrupt and a custom clean filter named ltr. Upon git status or branch checkout, the setup triggered a shell script that downloaded and executed remote code from a server hosted on vercelscript.vercel.app. The attack leveraged post-checkout hooks and Git filters to run silently without requiring install scripts or explicit execution. Multiple trigger paths existed, including automatic detection in Visual Studio Code, Git-aware terminal prompts, and following README instructions to switch branches. The technique worked on both Linux/macOS and Windows through Git for Windows shell support. The incident highlights risks of opening untrusted Git repositories delivered outside standard clone workflows.
OIDC-Based Push Deployment on VPS Removes SSH Keys from CI While Enforcing Strict Isolation
A new self-hosted deployment system called cd enables secure continuous delivery to single Linux VPS hosts running Docker without storing any long-lived secrets in CI repositories. The architecture relies on short-lived OIDC JWT tokens issued by GitHub Actions or GitLab CI, verified on the target server through JWKS public keys. The server component cdd performs token validation, archive checks, resource-limited builds inside BuildKit, health checks, and automatic rollback on failure. All containers are launched with read-only root filesystems, dropped capabilities, no-new-privileges, and network binding restricted to 127.0.0.1 behind Caddy or Nginx. Administrative control is provided by the cdctl CLI that registers projects, sets RAM/CPU limits, and manages DNS records via Porkbun integration. The entire solution avoids external databases, web panels, and persistent secrets while enforcing one-repository-to-one-application boundaries.
Stolen Credentials Poison cPGuard Update Channel, Turning Security Software into Data Theft Backdoor
Attackers used compromised OPSSHIELD credentials to hijack the cPGuard update distribution network on November 2 at 02:06 UTC, injecting malicious scripts into versions 5.88.12 through 5.88.19. The poisoned updates targeted Linux servers running the security tool, which holds root privileges on hosting provider and cloud infrastructure machines. The script harvested /etc/shadow, /etc/passwd, MariaDB/MySQL root credentials from my.cnf, root shell history containing API tokens, and SSH authorized_keys files before exfiltrating them via the vendor's own infrastructure. A persistent backdoor was also dropped at /var/tmp/.cpg91511_sh. OPSSHIELD detected the intrusion within 12 hours and halted distribution, but confirmed that 32 customer servers had their data accessed. The incident highlights risks of relying on static credentials for security product update pipelines without code signing or behavioral restrictions.
Polymarket Suffers Supply Chain Attack via Compromised DebugBear Monitoring Script
Attackers compromised DNS records of DebugBear, a real user monitoring provider, to inject malicious JavaScript into Polymarket pages. The script extracted wallet data and trading credentials from browser storage, then used the platform's official relayer to execute unauthorized withdrawals totaling approximately $2.7 million across 737 wallets. No smart contract vulnerabilities were exploited; all 985 unauthorized transactions carried valid user signatures. The incident occurred on October 29 and was resolved within an hour after trading was halted, with Polymarket returning $3.9 million including compensation. This attack class matches the 2023 Ledger Connect Kit compromise, highlighting risks from third-party scripts in browser sessions. Polymarket has since committed to stricter CSP policies, script pinning, and sandboxing. The case underscores that browser-based sessions with full API privileges remain a critical trust boundary in crypto platforms.