Skip to content
Heist/ feed
Back to feed
UnratedFix available

Build environment compiled into the library and readable at runtime

Type: advisorySources: OSV

The build script of `rustpython-vm` 0.3.0 through 0.5.0 writes every environment variable of the build into `$OUT_DIR/env_vars.rs`. The crate compiles that file into `_sysconfigdata`'s `build_time_vars`. That module is always compiled. A binary built in CI with secrets in the environment carries those secrets in clear text. Registry tokens, cloud credentials and API keys are the usual ones. Anyone with the binary can read them with `strings` or from Python. Version 0.6.0 removes the dump and the include. Users of earlier versions should upgrade, rebuild, and ship new binaries. Every secret that was in the environment of a past build whose output left the build machine should be treated as exposed. Jacob Finkelman first reported the issue in [#8802](https://github.com/RustPython/RustPython/issues/8802). [Bitbison](https://registry.bitbison.io/cargo/rustpython-vm)'s automated supply chain scanning then detected credential data from the build environment flowing into artifacts that third-party software ships in the wild. The leak was confirmed in the published release binaries of at least four dependants but others have been impacted.

Products
rustpython-vm
Affected versions
Not specified
Fixed versions
0.6.0
CVEs
Not specified
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 14:47 UTC · Revision 1

Source evidence

Build environment compiled into the library and readable at runtime

core-osv · Original source

Published 23 Sept 2026, 12:00 UTC

The build script of `rustpython-vm` 0.3.0 through 0.5.0 writes every environment variable of the build into `$OUT_DIR/env_vars.rs`. The crate compiles that file into `_sysconfigdata`'s `build_time_vars`. That module is always compiled. A binary built in CI with secrets in the environment carries those secrets in clear text. Registry tokens, cloud credentials and API keys are the usual ones. Anyone with the binary can read them with `strings` or from Python. Version 0.6.0 removes the dump and the include. Users of earlier versions should upgrade, rebuild, and ship new binaries. Every secret that was in the environment of a past build whose output left the build machine should be treated as exposed. Jacob Finkelman first reported the issue in [#8802](https://github.com/RustPython/RustPython/issues/8802). [Bitbison](https://registry.bitbison.io/cargo/rustpython-vm)'s automated supply chain scanning then detected credential data from the build environment flowing into artifacts that third-party software ships in the wild. The leak was confirmed in the published release binaries of at least four dependants but others have been impacted.

osv:RUSTSEC-2026-0394

rustpython-vm

Fixed versions: 0.6.0

Complete source record
{
  "id": "ce85a7ced0150121a9c497232cc9d4c374f2e64ac970d1df6fd72e5e5d421b37",
  "url": "https://osv.dev/vulnerability/RUSTSEC-2026-0394",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Build environment compiled into the library and readable at runtime",
    "summary": "The build script of `rustpython-vm` 0.3.0 through 0.5.0 writes every environment variable of the build into `$OUT_DIR/env_vars.rs`. The crate compiles that file into `_sysconfigdata`'s `build_time_vars`. That module is always compiled. A binary built in CI with secrets in the environment carries those secrets in clear text. Registry tokens, cloud credentials and API keys are the usual ones. Anyone with the binary can read them with `strings` or from Python. Version 0.6.0 removes the dump and the include. Users of earlier versions should upgrade, rebuild, and ship new binaries. Every secret that was in the environment of a past build whose output left the build machine should be treated as exposed. Jacob Finkelman first reported the issue in [#8802](https://github.com/RustPython/RustPython/issues/8802). [Bitbison](https://registry.bitbison.io/cargo/rustpython-vm)'s automated supply chain scanning then detected credential data from the build environment flowing into artifacts that third-party software ships in the wild. The leak was confirmed in the published release binaries of at least four dependants but others have been impacted.",
    "evidence": "osv:RUSTSEC-2026-0394",
    "products": [
      {
        "name": {
          "value": "rustpython-vm",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "0.6.0",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "RUSTSEC-2026-0394",
      "aliases": [
        "RUSTSEC-2026-0394"
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "0.3.0"
                },
                {
                  "fixed": "0.6.0"
                }
              ]
            }
          ],
          "package": {
            "name": "rustpython-vm",
            "purl": "pkg:cargo/rustpython-vm",
            "ecosystem": "crates.io"
          },
          "database_specific": {
            "cvss": null,
            "source": "https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0394.json",
            "categories": [],
            "informational": null
          },
          "ecosystem_specific": {
            "affects": {
              "os": [],
              "arch": [],
              "functions": []
            },
            "affected_functions": null
          }
        }
      ],
      "modified": "2026-10-26T14:00:05.690177191Z",
      "provider": "osv",
      "references": [
        "https://crates.io/crates/rustpython-vm",
        "https://rustsec.org/advisories/RUSTSEC-2026-0394.html",
        "https://github.com/RustPython/RustPython/pull/8813",
        "https://github.com/RustPython/RustPython/issues/8802",
        "https://github.com/RustPython/RustPython/issues/9236",
        "https://crates.io/crates/rustpython-vm/0.6.0",
        "https://registry.bitbison.io/cargo/rustpython-vm"
      ],
      "provider_metadata": {
        "license": "CC0-1.0"
      }
    },
    "related_cves": [],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 454197,
  "published_at": "2026-09-23T12:00:00+00:00"
}