CVE-2026-54250: K3s: ZIP Archive Path Traversal Vulnerability in etcd Snapshot Decompression
Summary
A path traversal vulnerability exists in K3s's etcd snapshot decompression functionality. Zip files containing archive members with maliciously crafted names (e.g., ../../../../etc/password) can be written to arbitrary locations on the filesystem when an administrator restores the archive as a compressed etcd snapshot.
Mitigations
Enable golang's built-in insecure path protections when restoring snapshots by setting theGODEBUG environment variable: bash GODEBUG=zipinsecurepath=0 k3s server --cluster-reset --cluster-reset-restore-path=/path/to/snapshot.zip Manually extract the snapshot from the zip archive before restoring it. If the snapshot to be restored does not end with .zip, the vulnerable extraction code will not be executed.
Additional Notes
Administrators should be aware of the cautions noted in the "Security" section of the documentation on Restoring Snapshots.
Other sources
K3s is a fully conformant production-ready Kubernetes distribution. Prior to 1.35.3+k3s1, 1.34.6+k3s1, v1.33.10+k3s1, a path traversal vulnerability exists in K3s's etcd snapshot decompression functionality. Zip files containing archive members with maliciously crafted names can be written to arbitrary locations on the filesystem when an administrator restores the archive as a compressed etcd snapshot. This vulnerability is fixed in 1.35.3+k3s1, 1.34.6+k3s1, v1.33.10+k3s1.
— NVD
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
go/github.com/k3s-io/k3sto a version that resolves this vulnerability.Fixed in 1.33.10 - Upgrade
Upgrade
go/github.com/k3s-io/k3sto a version that resolves this vulnerability.Fixed in 1.34.6 - Upgrade
Upgrade
go/github.com/k3s-io/k3sto a version that resolves this vulnerability.Fixed in 1.35.3 - Upgrade
Upgrade
k3s etcd snapshot decompressionto a version that resolves this vulnerability.Fixed in 1.35.3+k3s1 - Upgrade
Upgrade
k3s etcd snapshot decompressionto a version that resolves this vulnerability.Fixed in 1.34.6+k3s1 - Upgrade
Upgrade
k3s etcd snapshot decompressionto a version that resolves this vulnerability.Fixed in v1.33.10+k3s1 - Configuration
When restoring a snapshot from a zip archive, start k3s server with GODEBUG=zipinsecurepath=0 (e.g., GODEBUG=zipinsecurepath=0 k3s server --cluster-reset --cluster-reset-restore-path=/path/to/snapshot.zip) to enable Go's built-in insecure path protections.
k3s server (etcd snapshot restore) GODEBUG = zipinsecurepath=0 - Configuration
Manually extract the snapshot from the zip archive before restoring it (so the vulnerable zip extraction path traversal code is not executed during restore).
Snapshot restore process zip archive handling = manual extract before restoring
Event History
Frequently Asked Questions
What is the severity of CVE-2026-54250?
The severity of CVE-2026-54250 is classified as medium with a score of 5.8.
How do I fix CVE-2026-54250?
To fix CVE-2026-54250, upgrade to K3s version 1.35.3+k3s1, 1.34.6+k3s1, or v1.33.10+k3s1 or later.
What type of vulnerability is CVE-2026-54250?
CVE-2026-54250 is a path traversal vulnerability found in K3s's etcd snapshot decompression functionality.
What are the potential impacts of CVE-2026-54250?
CVE-2026-54250 can lead to unauthorized file writes and possible code execution due to maliciously crafted ZIP file names.
Which software is affected by CVE-2026-54250?
CVE-2026-54250 affects K3s versions prior to 1.35.3+k3s1, 1.34.6+k3s1, and v1.33.10+k3s1.