# GHSA-wj7f-468m-6mv8: Environment variables still accessible through /proc

- Severity: Medium 4.0 (CVSS:3.1, scored by GitHub) `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2023-12-01T22:46:37.000Z
- Modified: 2023-12-01T22:46:37.000Z
- Weaknesses: CWE-200

## Description

### Impact

Environment variables can be read from procfs unless a new process is started.

### PoC

```
use birdcage::{Birdcage, Sandbox};
use std::{env, fs};

fn main() {
    Birdcage::new().lock().unwrap();

    assert_eq!(env::var_os("SECRET"), None);

    let environ = fs::read_to_string("/proc/self/environ").unwrap();
    assert!(!environ.contains("SECRET"), "ENVIRON CONTAINS SECRET:\n{environ}");
}
```

```
$  SECRET=test cargo run
thread 'main' panicked at src/main.rs:10:5:
ENVIRON CONTAINS SECRET:
 [truncated]
 ```

### Possible Solutions

The simplest solution would be relying on the ptrace isolation and **always** spawning a new process by changing birdcage's API to create a new command. With an additional PID namespace the guarantees could be even further reinforced.

(As written by GitHub Advisory Database.)

## Affected

- birdcage (crates.io): before 0.7.0

## References

- <https://github.com/phylum-dev/birdcage/security/advisories/GHSA-wj7f-468m-6mv8> (web)
- <https://github.com/phylum-dev/birdcage> (package)

## Sources

- GitHub Advisory Database: [GHSA-wj7f-468m-6mv8](https://github.com/advisories/GHSA-wj7f-468m-6mv8), CC-BY-4.0, modified 2023-12-01

---

Page: https://cve.day/GHSA-wj7f-468m-6mv8 · Whole record: https://cve.day/GHSA-wj7f-468m-6mv8.json · Rebuilt by cve.day 2026-11-25T22:56:42.852Z
