Podman Build Context Information Disclosure Vulnerability

Vulnerability

A vulnerability exists in Podman where data written to RUN --mount=type=bind mounts during the build process is not properly discarded. This flaw can result in files created within the container being accessible in the temporary build context directory on the host. The issue arises when an unprivileged user has access to the host during the build, the container build includes long-running steps that delay the removal of the build context, and files are created with overly permissive permissions.

Impact

Exploitation of this vulnerability could lead to unauthorized access to sensitive files temporarily present in the build context, especially if those files have been assigned permissive permissions allowing read or write access.

Reproduction

To reproduce this vulnerability, initiate a Podman build process using a Containerfile that includes a RUN command with a bind mount. Incorporate a long-running step, such as a sleep command, which will keep the build context active while the file permissions are set to 4777. During the build, an unprivileged user on the host can access the exposed file before the build context is cleared.

Remediation

Avoid long-running build steps and use RUN --mount=type=secret for sensitive data instead of bind mounts.

Added: Sep 16, 2025, 3:41 PM
Updated: Sep 16, 2025, 3:41 PM

Vulnerability Rating

Custom Algorithm
spread
6.6
impact
3.3
exploitability
4.2
remediation
7.9
relevance
0.5
threat
6.4
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.