Why This Matters for Homelab Users
You switched to Podman specifically because rootless containers sounded like the right call — no daemon running as root, no Docker socket to expose, user namespaces doing the heavy lifting. That reasoning is still sound. But a class of vulnerability in how Podman handles file copy operations in rootless mode means your setup may not be as isolated as you assumed.
This article covers exactly what the exploit does, how to determine if your version is affected, and what concrete steps you should take today.
What the Copy Fail Exploit Actually Does
The vulnerability lives in podman cp — the command that copies files between a container and the host filesystem. In rootless mode, Podman uses user namespace mappings to fake elevated permissions inside the container. A UID of 0 inside the container maps to your unprivileged UID on the host.
The problem: during certain copy operations that fail mid-execution, Podman’s error handling doesn’t fully unwind the privilege context. An attacker who can influence what gets copied — through a malicious container image or a compromised process inside a container — can potentially write files to host paths with incorrect ownership or permissions that persist after the failed copy.
In practice, this means:
- Files can land on the host with setuid bits or ownership that the unprivileged host user shouldn’t be able to set
- The “fail” state is the exploit trigger — a carefully crafted copy that’s designed to fail at the right moment
- The impact is constrained to what your user namespace mapping allows, but in a homelab where your containers run as your own UID, that’s still your home directory, your bind-mounted NAS shares, and anything else your user touches
This is not a remote code execution vulnerability out of the box. It requires either a malicious image or an attacker who already has some foothold inside a running container. In a homelab context, that means the risk vector is primarily untrusted or unvetted container images and containers exposed to the internet without hardening.
Are You Affected? Check Your Podman Version
Run this and compare:
podman --version
The fix was backported into patched builds. As a general rule:
- Podman < 4.9.x on most distros: likely unpatched, check your distro’s security advisory
- Podman 5.x: patches were applied in point releases — check that you’re on the latest point release for your branch
- RHEL/CentOS Stream/Fedora: use
rpm -q podmanand cross-reference with Red Hat’s CVE tracker
# Check installed version with full package details (RPM-based systems)
rpm -qi podman | grep -E "Version|Release|Build"
# On Debian/Ubuntu-based systems
apt-cache policy podman
To verify your rootless setup is actually running in user namespace mode:
podman info | grep -E "rootless|userns|cgroupVersion"
You should see rootless: true. If you see rootless: false, you’ve been running Podman as root — different attack surface, different risks.
Concrete Mitigation Steps
1. Update Podman
This is the primary fix. On common distro families:
# Fedora / RHEL / CentOS Stream
sudo dnf update podman -y
# Ubuntu / Debian (if using the Kubic repo or official backports)
sudo apt update && sudo apt upgrade podman -y
# Arch Linux
sudo pacman -Syu podman
After updating, restart any running rootless containers:
# Stop all rootless containers for your user
podman stop --all
# Restart your compose stack
podman-compose down && podman-compose up -d
2. Audit Your podman cp Usage
If you have scripts or cron jobs that use podman cp, review them:
# Find any scripts referencing podman cp
grep -r "podman cp" ~/scripts/ /etc/cron* ~/.config/systemd/user/
Avoid using podman cp in automated workflows until you’ve confirmed you’re on a patched version. Use volume mounts instead wherever possible.
3. Prefer Volume Mounts Over podman cp
If you’re copying config files or data into containers as part of a setup routine, replace podman cp with a proper bind mount in your Compose file:
# podman-compose.yml — use bind mounts instead of podman cp for config delivery
version: "3.8"
services:
myapp:
image: myapp:latest
volumes:
- ./config/myapp.conf:/etc/myapp/myapp.conf:ro,Z
- ./data:/var/lib/myapp:Z
restart: unless-stopped
The :Z label is Podman-specific — it applies the correct SELinux context for rootless containers. Without it, SELinux can block access on Fedora/RHEL-based systems.
4. Don’t Pull Untrusted Images
This exploit requires some attacker influence over the copy operation. Running images from Docker Hub without verification is the easiest way to introduce that influence.
# Verify image signatures where available (Podman 5.x with cosign integration)
podman pull --verify-signature docker.io/library/nginx:latest
# Or use a local registry mirror you control
podman pull registry.homelab.local/nginx:latest
At minimum, pin image digests rather than tags in production-adjacent homelab services:
image: nginx@sha256:a304d9b2ddc93b37e9a9e0c9e12f9a3ac9fa9d3e9b1f7c6e8b2d4f0a1c3e5g7i
Rootless Podman vs. Docker: The Homelab Security Trade-off
For context, here’s where things stand for typical homelab deployments:
| Factor | Rootless Podman | Docker (default) |
|---|---|---|
| Daemon running as root | No | Yes |
| Docker socket exposure risk | Not applicable | High if socket is mounted |
| User namespace isolation | Built-in | Optional, requires config |
cp-related attack surface | Present (this CVE) | Different cp path, own risks |
| Compose support | podman-compose or Quadlets | Docker Compose native |
| Systemd integration | Native (Quadlets) | Requires workarounds |
| SELinux labeling | Built-in :Z support | Manual configuration |
Docker’s daemon running as root is a substantially larger standing risk than this specific Podman exploit. If someone compromises a Docker socket or a container in a root-daemon Docker setup, they own the host. The Podman copy fail exploit is more constrained.
The takeaway: patch Podman, keep running rootless mode. The architecture is still sound.
What’s Next
- /homelab/podman-quadlets-systemd-homelab-guide — Replace podman-compose with Quadlets for proper systemd integration and automatic container restarts
- /homelab/securing-homelab-containers-selinux — How SELinux labels and policies actually protect your rootless containers in practice
- /homelab/self-hosted-container-registry-homelab — Run your own registry to eliminate dependency on Docker Hub and control image provenance
- /homelab/podman-vs-docker-homelab-2026 — Full comparison of Podman and Docker for homelab use cases in 2026, including Compose compatibility and networking
[discussion]
Comments are powered by Giscus — backed by GitHub Discussions. Sign in with GitHub to join the conversation.