---
id: "CVE-2026-19730"
kind: "vulnerability"
aliases: ["CVE-2026-19730", "GHSA-fx76-2j3w-2mx6", "GO-2026-6588"]
title: "podman quadlet install --replace does not fully replace the old file in github.com/containers/podman"
severity: "medium"
cvss: 4.2
epss: 0.00163
exploited: false
status: "open"
category: "package"
products: [{"name": "github.com/containers/podman", "fixed": [], "affected": "all versions", "ecosystem": "go"}, {"name": "github.com/containers/podman/v2", "fixed": [], "affected": "all versions", "ecosystem": "go"}, {"name": "github.com/containers/podman/v3", "fixed": [], "affected": "all versions", "ecosystem": "go"}, {"name": "github.com/containers/podman/v4", "fixed": [], "affected": "all versions", "ecosystem": "go"}, {"name": "github.com/containers/podman/v5", "fixed": ["5.8.6"], "affected": ">= 5.7.0, < 5.8.6", "ecosystem": "go"}]
ecosystems: ["go"]
tags: ["go", "package", "podman", "quadlet", "rhel", "xfs"]
not_affected_if: ["podman-outside-5.7.0-to-5.8.6-range", "reflink-supported-filesystem"]
published_at: "2026-08-13T18:17:25+00:00"
first_seen_at: "2026-10-23T19:13:08+00:00"
updated_at: "2026-10-23T21:49:18+00:00"
sources: [{"source": "govuln", "url": "https://pkg.go.dev/vuln/GO-2026-6588", "first_seen_at": "2026-10-23T19:13:08+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-19730", "first_seen_at": "2026-10-23T19:13:43+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-19730", "first_seen_at": "2026-10-23T19:35:23+00:00"}]
---

# podman quadlet install --replace does not fully replace the old file in github.com/containers/podman

podman quadlet install --replace can leave the tail of the old Quadlet file in place when the new file is shorter, because the file is opened without O_TRUNC and the reflink fallback copies without truncating. Leftover lines, such as security options like AddCapability or extra volume mounts, stay active and the command reports success.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- go:github.com/containers/podman affected all versions fixed ?
- go:github.com/containers/podman/v2 affected all versions fixed ?
- go:github.com/containers/podman/v3 affected all versions fixed ?
- go:github.com/containers/podman/v4 affected all versions fixed ?
- go:github.com/containers/podman/v5 affected >= 5.7.0, < 5.8.6 fixed 5.8.6

## How to check

After running podman quadlet install --replace, compare the installed Quadlet file size with the new source file; a larger installed file contains leftover content from the old version.

## Fix

Upgrade the podman v5 line to 5.8.6. Fixed versions for the v2, v3 and v4 module paths are unknown from the sources.

## Timeline

- 2026-10-23T19:13:08+00:00 govuln https://pkg.go.dev/vuln/GO-2026-6588
- 2026-10-23T19:13:43+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-19730
- 2026-10-23T19:35:23+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-19730

## From the sources

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

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
