4.2medium
Podman: podman: quadlet install --replace non-truncating write retains removed host-access directives
- Severity
- 4.2medium CVSS:3.1 by redhat
- Exploit likelihood
- 0.19% (higher than 9% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- redhat
- Also known as
- GHSA-fx76-2j3w-2mx6GO-2026-6588
Description
The 'podman quadlet install --replace' command opens the existing destination file with O_CREATE|O_WRONLY but omits O_TRUNC. When the initial reflink copy attempt fails (common on non-reflink-capable filesystems including many RHEL default XFS configurations), the fallback in ReflinkOrCopy uses io.Copy which performs a non-truncating write. If the original Quadlet is larger than the new Quadlet, the file is not truncated and content from the original is preserved. The command completes with no warning. There is no risk of information leakage as the user already had access to the Quadlet in order to replace it, and in most cases, this would only lead to invalid Quadlet files. However, security-related options from the end of the old Quadlet could be included in the new Quadlet, and if the truncation resulted in a valid Quadlet file, this could result in undesirable behavior. For example, running podman quadlet install --replace to remove a single line from the end of a Quadlet - including security-sensitive content, like AddCapability - will fail, and the option will continue to be used. Further, with Volume Quadlets, this can include additional mounts which can cause content to be unintentionally exposed into containers. If, later, the image is updated then compromised content might be leaked to an attacker. The vulnerable code paths are in pkg/domain/infra/abi/quadlet.go (lines 338-360, O_CREATE|O_WRONLY without O_TRUNC) and vendor/go.podman.io/storage/pkg/fileutils/reflink_linux.go (lines 12-19, non-truncating io.Copy fallback).
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| podman | Not specified Not affected: from 7:5.8.2-9.el10_2 before *, from 6:5.8.5-5.el9_9 before *, from 6:5.8.2-7.el9_8 before * | CVE List |
| ansible-automation-platform-24/eda-controller-rhel8 | Not specified | CVE List |
| ansible-automation-platform-25/eda-controller-rhel8 | Not specified | CVE List |
| ansible-automation-platform-26/eda-controller-rhel9 | Not specified | CVE List |
| ansible-automation-platform-27/eda-controller-rhel9 | Not specified | CVE List |
| container-tools:rhel8/podman | Not specified | CVE List |
| devspaces/udi-base-rhel10 | Not specified | CVE List |
| devspaces/udi-base-rhel9 | Not specified | CVE List |
| devspaces/udi-rhel9 | Not specified | CVE List |
| container-native-virtualization/ocp-virt-validation-checkup-rhel9 | Not specified | CVE List |
| quay/quay-builder-rhel8 | Not specified | CVE List |
| quay/quay-builder-rhel9 | Not specified | CVE List |
| github.com/containers/podman/v5 (Go) | from 5.7.0 before 5.8.6 | GitHub Advisory Database, Go Vulnerability Database |
| github.com/containers/podman (Go) | all versions | Go Vulnerability Database |
| github.com/containers/podman/v2 (Go) | all versions | Go Vulnerability Database |
| github.com/containers/podman/v3 (Go) | all versions | Go Vulnerability Database |
| github.com/containers/podman/v4 (Go) | all versions | Go Vulnerability Database |
All scores
| redhat | 4.2medium CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:L |
| GitHub | 4.2medium CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:L |
Classification
What each source says
CVE List
The 'podman quadlet install --replace' command opens the existing destination file with O_CREATE|O_WRONLY but omits O_TRUNC. When the initial reflink copy attempt fails (common on non-reflink-capable filesystems including many RHEL default XFS configurations), the fallback in ReflinkOrCopy uses io.Copy which performs a non-truncating write. If the original Quadlet is larger than the new Quadlet, the file is not truncated and content from the original is preserved. The command completes with no warning. There is no risk of information leakage as the user already had access to the Quadlet in order to replace it, and in most cases, this would only lead to invalid Quadlet files. However, security-related options from the end of the old Quadlet could be included in the new Quadlet, and if the truncation resulted in a valid Quadlet file, this could result in undesirable behavior. For example, running podman quadlet install --replace to remove a single line from the end of a Quadlet - including security-sensitive content, like AddCapability - will fail, and the option will continue to be used. Further, with Volume Quadlets, this can include additional mounts which can cause content to be unintentionally exposed into containers. If, later, the image is updated then compromised content might be leaked to an attacker. The vulnerable code paths are in pkg/domain/infra/abi/quadlet.go (lines 338-360, O_CREATE|O_WRONLY without O_TRUNC) and vendor/go.podman.io/storage/pkg/fileutils/reflink_linux.go (lines 12-19, non-truncating io.Copy fallback).
GitHub Advisory Database
Impact
When running podman quadlet install --replace to replace a Quadlet file, if the original Quadlet is larger than the new Quadlet, the file would not be truncated and content from the original would be preserved. There is no risk of information leakage as the user already had access to the Quadlet in order to replace it, and in most cases, this would only lead to invalid Quadlet files (see https://github.com/podman-container-tools/podman/issues/29013). However, security-related options from the end of the old Quadlet could be included in the new Quadlet, and if the truncation resulted in a valid Quadlet file, this could result in undesirable behavior. For example, running podman quadlet install --replace to remove a single line from the end of a Quadlet - including security-sensitive content, like AddCapability - will fail, and the option will continue to be used. Further, with Volume Quadlets, this can include additional mounts which can cause content to be unintentionally exposed into containers. If, later, the image is updated then compromised content might be leaked to an attacker.
First introduced in commit 0ea4eaee70b7458bcc99d875529761faf5172651 with podman 5.7.0
Patches
a38a9b7d20915c55e6f3c451101ae72d6da33742 (fixed in 6.0.0)
d3adfdeec7d5c9eee5a6978df3bee62a866c958d d4fe9154ec6e32a02d5fcd096c4a27c38f2040f4 (for v5.8 branch, fixed in 5.8.6)
Workarounds
Manually copy the quadlet files to the quadlet directory.
Credits
Podman thanks Christopher Lusk clusk@northecho.dev (North Echo Security Research) for reporting the security impact of this problem.
Go Vulnerability Database
podman quadlet install --replace does not fully replace the old file in github.com/containers/podman
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-19730 changed 2026-11-24 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-fx76-2j3w-2mx6 changed 2026-10-01 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-6588 changed 2026-10-01 | CC-BY-4.0 |
| NVD | CVE-2026-19730 changed 2026-11-24 | Public domain |