GHSA-wj7f-468m-6mv8: Birdcage Environment Variables Still Accessible Through Vulnerability

MODERATE
CVSS 4.0
CWE-200
Published
Advisory Summary

GHSA-wj7f-468m-6mv8 is a MODERATE (CVSS 4.0) environment variables still accessible through vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Birdcage libraries in the crates.io ecosystem. The issue involves environment variables still accessible through /proc. Remediation is available by upgrading affected packages to version 0.7.0.

GHSA-wj7f-468m-6mv8 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-wj7f-468m-6mv8
Severity MODERATE
CVSS v3.1 Base Score 4.0
CWE Classification CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
Affected Product Birdcage
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 4.0

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix GHSA-wj7f-468m-6mv8

To remediate this vulnerability, upgrade all affected Birdcage dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

birdcage fixed: 0.7.0
Upgrade birdcage to 0.7.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for birdcage

How to Check if You Are Affected

To determine whether your application is affected by GHSA-wj7f-468m-6mv8, inspect your project dependencies for Birdcage:

inspect dependencies for birdcage

Analyze the terminal output to locate any version of Birdcage in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.7.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In Birdcage, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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

GHSA-wj7f-468m-6mv8 Affected Birdcage Versions

1 component(s)
Fixed Versions:
0.7.0
Product / Package Ecosystem Affected Versions Fixed Version
birdcage
crates.io
< 0.7.0
0.7.0

References

Frequently Asked Questions

What is GHSA-wj7f-468m-6mv8?
GHSA-wj7f-468m-6mv8 is a security vulnerability in Birdcage involving Environment variables still accessible through /proc under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Which Birdcage versions are affected?
Affected versions include releases prior to 0.7.0 across affected packages: birdcage.
What version fixes GHSA-wj7f-468m-6mv8?
Upgrading to 0.7.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is birdcage affected?
Yes, birdcage is affected in releases prior to 0.7.0. Upgrade your dependency to 0.7.0 or later.
What is the CVSS score of GHSA-wj7f-468m-6mv8?
GHSA-wj7f-468m-6mv8 has a CVSS v3.1 base score of 4.0 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with GHSA-wj7f-468m-6mv8?
GHSA-wj7f-468m-6mv8 is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor (The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.).
How can I check crates.io dependencies for GHSA-wj7f-468m-6mv8?
Run the dependency tree command: 'inspect dependencies for birdcage'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-wj7f-468m-6mv8",
  "modified" : "2023-12-01T22:46:37Z",
  "published" : "2023-12-01T22:46:37Z",
  "aliases" : [ ],
  "summary" : "Environment variables still accessible through /proc",
  "details" : "### Impact\n\nEnvironment variables can be read from procfs unless a new process is started.\n\n### PoC\n\n```\nuse birdcage::{Birdcage, Sandbox};\nuse std::{env, fs};\n\nfn main() {\n    Birdcage::new().lock().unwrap();\n\n    assert_eq!(env::var_os(\"SECRET\"), None);\n\n    let environ = fs::read_to_string(\"/proc/self/environ\").unwrap();\n    assert!(!environ.contains(\"SECRET\"), \"ENVIRON CONTAINS SECRET:\\n{environ}\");\n}\n```\n\n```\n$  SECRET=test cargo run\nthread 'main' panicked at src/main.rs:10:5:\nENVIRON CONTAINS SECRET:\n [truncated]\n ```\n\n### Possible Solutions\n\nThe 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.\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "birdcage"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.7.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/phylum-dev/birdcage/security/advisories/GHSA-wj7f-468m-6mv8"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/phylum-dev/birdcage"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-12-01T22:46:37Z",
    "nvd_published_at" : null
  }
}