{"id":"RUSTSEC-2026-0394","summary":"Build environment compiled into the library and readable at runtime","details":"The build script of `rustpython-vm` 0.3.0 through 0.5.0 writes every\nenvironment variable of the build into `$OUT_DIR/env_vars.rs`. The crate\ncompiles that file into `_sysconfigdata`'s `build_time_vars`. That module is\nalways compiled.\n\nA binary built in CI with secrets in the environment carries those secrets\nin clear text. Registry tokens, cloud credentials and API keys are the usual\nones. Anyone with the binary can read them with `strings` or from Python.\n\nVersion 0.6.0 removes the dump and the include. Users of earlier versions\nshould upgrade, rebuild, and ship new binaries. Every secret that was in the\nenvironment of a past build whose output left the build machine should be\ntreated as exposed.\n\nJacob Finkelman first reported the issue in\n[#8802](https://github.com/RustPython/RustPython/issues/8802).\n[Bitbison](https://registry.bitbison.io/cargo/rustpython-vm)'s automated\nsupply chain scanning then detected credential data from the build\nenvironment flowing into artifacts that third-party software ships in the\nwild. The leak was confirmed in the published release binaries of at least four\ndependants but others have been impacted.","modified":"2026-10-26T14:00:05.690177191Z","published":"2026-09-23T12:00:00Z","database_specific":{"license":"CC0-1.0"},"references":[{"type":"PACKAGE","url":"https://crates.io/crates/rustpython-vm"},{"type":"ADVISORY","url":"https://rustsec.org/advisories/RUSTSEC-2026-0394.html"},{"type":"WEB","url":"https://github.com/RustPython/RustPython/pull/8813"},{"type":"REPORT","url":"https://github.com/RustPython/RustPython/issues/8802"},{"type":"REPORT","url":"https://github.com/RustPython/RustPython/issues/9236"},{"type":"PACKAGE","url":"https://crates.io/crates/rustpython-vm/0.6.0"},{"type":"WEB","url":"https://registry.bitbison.io/cargo/rustpython-vm"}],"affected":[{"package":{"name":"rustpython-vm","ecosystem":"crates.io","purl":"pkg:cargo/rustpython-vm"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.3.0"},{"fixed":"0.6.0"}]}],"ecosystem_specific":{"affects":{"functions":[],"arch":[],"os":[]},"affected_functions":null},"database_specific":{"source":"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0394.json","cvss":null,"informational":null,"categories":[]}}],"schema_version":"1.9.0"}