
CVE-2026-108592 — Environment Variable Exposure PoC in mini-swe-agent
A proof of concept (PoC) for testing environment-variable inheritance in the BubblewrapEnvironment sandbox used by mini-swe-agent. At the time of release, this is the only PoC publicly available.
CVE-2026-108592 describes a potential security issue in which commands running inside a Bubblewrap sandbox may inherit environment variables from the host environment (CWE-526).
This repository contains a minimal proof-of-concept for checking whether a command executed inside a Bubblewrap sandbox inherits environment variables from the host process.
This is a detection test only. It does not prove the full attack path described by the CVE, nor does it confirm that real credentials are present. The goal is to determine whether a harmless dummy variable is visible from inside the sandbox.
Environment variables sometimes contain sensitive information, such as API keys, access tokens, and service credentials. If a sandbox exposes these values to commands that should not have access to them, sensitive information could be at risk.
The root cause is that the sandbox is inheriting environment variables from the host process instead of starting with a sanitized environment. In the PoC, the host sets CVE_TEST_MARKER via os.environ, then creates BubblewrapEnvironment with env={}; however, the sandbox still exposes that variable to commands executed inside it. As a result, a command such as printf "%s\n" "$CVE_TEST_MARKER" can read the host variable from inside the sandbox, which is the vulnerability.
Attackers using prompt injection in processed task content can make the agent read API keys from the environment and exfiltrate them over the shared network.
This PoC uses a harmless dummy environment variable to test whether a value defined in the host environment is visible inside the sandbox.
mini-swe-agentBubblewrapEnvironmentVerify the affected version range and available fixes against the project's official advisories.
mini-swe-agent with the relevant BubblewrapEnvironment implementationbwrap) installedFollow the official installation instructions for the version of mini-swe-agent you intend to test.
Verify that Bubblewrap is installed:
bwrap --version
Save the PoC as:
poc.py
Run the test from the Python environment where mini-swe-agent is installed:
python3 poc.py
Create a dummy marker:
export CVE_TEST_MARKER="dummy-value-12345"
The test marker is:
CVE_TEST_MARKER=dummy-test-value-108592
No real credentials are required.
Example output:
Sandbox exit code: 0
Marker output: 'dummy-test-value-108592\n'
CONFIRMED: dummy marker inherited by sandbox.
This indicates that the tested sandbox configuration allowed the command to observe the dummy host environment variable.
If the marker does not appear, the test did not confirm inheritance under the tested configuration. Review the sandbox implementation and environment configuration before drawing a conclusion.
An unsuccessful execution is inconclusive. Check Bubblewrap availability, Linux sandbox requirements, package compatibility, and the Python environment.
A sandbox may restrict filesystem access and process capabilities without automatically removing environment variables inherited from its parent process.
If sensitive values remain accessible inside the sandbox, untrusted commands or agent-generated code may be able to read them. The practical impact depends on the execution context, available credentials, network restrictions, and other controls.
A common mitigation is to clear the inherited environment and explicitly allowlist the variables required by the sandbox.
This PoC tests whether a dummy environment variable is visible to a command executed through the tested sandbox.
It does not independently establish:
A positive result demonstrates environment inheritance in the tested configuration, not necessarily the entire CVE attack chain.
This PoC is intended for authorized security testing, debugging, and educational use. Run it only in an environment you control, and use dummy values rather than actual credentials.