env-test-guard (crates.io): malicious Rust test crate exfiltrates CI tokens via webhook.site and DNS (no CVE)
Severity: critical · Patch status: no-fix-needed · Since 2026-11-09
The Rust crate env-test-guard, posing as a Git test toolkit, contains malicious code in GitEnv::detect() that steals CI credentials. Version 0.3.0 reads GITHUBTOKEN, GHTOKEN, INPUTGITHUBTOKEN and INPUTCLAUDECODEOAUTHTOKEN, encrypts them with an embedded passphrase and POSTs them to a webhook.site endpoint via curl; version 0.2.0 leaks INPUTGITHUBTOKEN and INPUTCLAUDECODEOAUTHTOKEN in cleartext via nslookup DNS lookups to buri.dns.praetorianlabs.com. Nothing runs at build time; execution occurs in any test or program calling GitEnv::detect(), typically on CI runners where tokens are set. Versions 0.2.0 and 0.3.0, published 2026-03-24/25, remain available on crates.io with no fixed versions. Discovered via OpenSSF and published to the GitHub Advisory Database on 2026-11-09.
What to do
- Remove and ban env-test-guard (all versions) from all Cargo.toml/lockfiles and internal registries
- Rotate GITHUB_TOKEN, GH_TOKEN, INPUT_GITHUB_TOKEN and INPUT_CLAUDE_CODE_OAUTH_TOKEN secrets on any CI runner that ran tests using the crate
- Audit CI logs and DNS/webhook egress for connections to webhook.site/fcd2a057-9288-4ac1-9c62-e6f57e6c7403 or buri.dns.praetorianlabs.com
- Check whether any exfiltrated tokens were used, and revoke downstream OAuth sessions (e.g. Claude Code OAuth tokens)
- Add dependency review/scanning to block known malicious crates
Sources
All live incidents on Threat Watch