Security mailing lists by PureSourceCode

GHSA-wj7f-468m-6mv8

MEDIUM 4.0CVSS 3.1

Environment variables still accessible through /proc

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.

Published
1 Dec 2023
Last modified
1 Dec 2023
Weakness
CWE-200
Sources
OSVJSON

Scores

SourceScored byVersionScoreVector / decision
OSV GitHub CVSS 3.1 MEDIUM 4.0 CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
OSV crates.io birdcage < 0.7.0 0.7.0

References

History

  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 1 Dec 2023)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.