GHSA-wj7f-468m-6mv8

    Dashboard / Vulnerabilities / GHSA-wj7f-468m-6mv8

    GHSA-wj7f-468m-6mv8

    Published: 1 Dec 2023Last Modified: 1 Dec 2023

    Summary: Environment variables still accessible through /proc

    Details: ### 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.

    Affected packages

    Package

    Name: birdcage

    Purl: pkg:cargo/birdcage

    Affected ranges

    Type: SEMVER

    Events:

    Introduced- 0
    Fixed -0.7.0

    Affected versions

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High
    GHSA-wj7f-468m-6mv8 | CVE-DB