MAL-2026-18776: Malicious code in env_test_guard (crates.io)

Published Nov 7, 2026
·
Updated

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/gitenv.rs, cipreflight) 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/gitenv.rs lines 166-253) reads GITHUBTOKEN, GHTOKEN, INPUTGITHUBTOKEN and INPUTCLAUDECODEOAUTHTOKEN (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/gitenv.rs lines 166-196) reads INPUTGITHUBTOKEN and INPUTCLAUDECODEOAUTHTOKEN 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.

Affected Software

1 affected component
rust/env-test-guard=0.2.0, =0.3.0

Event History

Nov 7, 2026
Advisory Published
via OSV·09:46 PM
Data Sourced
via OSV·09:46 PM
DescriptionAffected Software

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203