CVE-2026-39822 Root escape via symlink plus trailing slash in os
Attackers can escape restricted directories in Go applications by exploiting symlink handling with trailing slashes, allowing unauthorized file access.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-39822?
CVE-2026-39822 is a high-severity path traversal vulnerability in Golang Go, published on 8 Jul 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
On Unix systems, opening a file in an os.Root improperly follows symlinks to locations outside of the Root when the final path component of the a path is a symbolic link and the path ends in /. For example, 'root.Open("symlink/")' will open "symlink" even when "symlink" is a symbolic link pointing outside of the root.
Weakness: CWE-61
Which versions are affected by CVE-2026-39822?
2 open source packages ship an affected version, including golang and stdlib. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
golang Bitnami | All versions | 1.25.12, 1.26.5, 1.27.0 |
stdlib Go | All versions | 1.25.12, 1.26.5, 1.27.0-rc.2 |
Linux distribution packages (38)
buildah AlmaLinux:10 | All versions | 2:1.43.1-4.el10_2 |
buildah-tests AlmaLinux:10 | All versions | 2:1.43.1-4.el10_2 |
podman AlmaLinux:10 | All versions | 7:5.8.2-5.el10_2.alma.1 |
podman-docker AlmaLinux:10 | All versions | 7:5.8.2-5.el10_2.alma.1 |
podman-remote AlmaLinux:10 | All versions | 7:5.8.2-5.el10_2.alma.1 |
podman-tests AlmaLinux:10 | All versions | 7:5.8.2-5.el10_2.alma.1 |
buildah AlmaLinux:9 | All versions | 2:1.43.1-4.el9_8 |
buildah-tests AlmaLinux:9 | All versions | 2:1.43.1-4.el9_8 |
podman AlmaLinux:9 | All versions | 6:5.8.2-5.el9_8 |
podman-docker AlmaLinux:9 | All versions | 6:5.8.2-5.el9_8 |
podman-plugins AlmaLinux:9 | All versions | 6:5.8.2-5.el9_8 |
podman-remote AlmaLinux:9 | All versions | 6:5.8.2-5.el9_8 |
podman-tests AlmaLinux:9 | All versions | 6:5.8.2-5.el9_8 |
buildah Red Hat:enterprise_linux:10.2 | All versions | 2:1.43.1-4.el10_2 |
buildah-debuginfo Red Hat:enterprise_linux:10.2 | All versions | 2:1.43.1-4.el10_2 |
buildah-debugsource Red Hat:enterprise_linux:10.2 | All versions | 2:1.43.1-4.el10_2 |
buildah-tests Red Hat:enterprise_linux:10.2 | All versions | 2:1.43.1-4.el10_2 |
buildah-tests-debuginfo Red Hat:enterprise_linux:10.2 | All versions | 2:1.43.1-4.el10_2 |
podman Red Hat:enterprise_linux:10.2 | All versions | 7:5.8.2-5.el10_2 |
podman-debuginfo Red Hat:enterprise_linux:10.2 | All versions | 7:5.8.2-5.el10_2 |
podman-debugsource Red Hat:enterprise_linux:10.2 | All versions | 7:5.8.2-5.el10_2 |
podman-docker Red Hat:enterprise_linux:10.2 | All versions | 7:5.8.2-5.el10_2 |
podman-remote Red Hat:enterprise_linux:10.2 | All versions | 7:5.8.2-5.el10_2 |
podman-remote-debuginfo Red Hat:enterprise_linux:10.2 | All versions | 7:5.8.2-5.el10_2 |
podman-tests Red Hat:enterprise_linux:10.2 | All versions | 7:5.8.2-5.el10_2 |
podman-tests-debuginfo Red Hat:enterprise_linux:10.2 | All versions | 7:5.8.2-5.el10_2 |
buildah Red Hat:enterprise_linux:9::appstream | All versions | 2:1.43.1-4.el9_8 |
buildah-debuginfo Red Hat:enterprise_linux:9::appstream | All versions | 2:1.43.1-4.el9_8 |
buildah-debugsource Red Hat:enterprise_linux:9::appstream | All versions | 2:1.43.1-4.el9_8 |
buildah-tests Red Hat:enterprise_linux:9::appstream | All versions | 2:1.43.1-4.el9_8 |
buildah-tests-debuginfo Red Hat:enterprise_linux:9::appstream | All versions | 2:1.43.1-4.el9_8 |
podman Red Hat:enterprise_linux:9::appstream | All versions | 6:5.8.2-5.el9_8 |
podman-debuginfo Red Hat:enterprise_linux:9::appstream | All versions | 6:5.8.2-5.el9_8 |
podman-debugsource Red Hat:enterprise_linux:9::appstream | All versions | 6:5.8.2-5.el9_8 |
podman-docker Red Hat:enterprise_linux:9::appstream | All versions | 6:5.8.2-5.el9_8 |
podman-plugins Red Hat:enterprise_linux:9::appstream | All versions | 6:5.8.2-5.el9_8 |
podman-plugins-debuginfo Red Hat:enterprise_linux:9::appstream | All versions | 6:5.8.2-5.el9_8 |
podman-remote Red Hat:enterprise_linux:9::appstream | All versions | 6:5.8.2-5.el9_8 |
Products include Golang Go.
How do I fix CVE-2026-39822?
Upgrade golang to a fixed version for your release line: 1.25.12, 1.26.5 or 1.27.0.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2026-39822 being exploited?
There is no known exploitation of CVE-2026-39822 in the wild and no public exploit code.
Other vulnerabilities in Golang Go
- CVE-2020-0601 Microsoft Windows CryptoAPI Spoofing
- CVE-2026-27143 Missing bound checks can lead to memory corruption in safe Go in cmd/compile
- CVE-2024-24790 Unexpected behavior from Is methods for IPv4-mapped IPv6 addresses in net/netip
- CVE-2023-39320 Arbitrary code execution via go.mod toolchain directive in cmd/go
- CVE-2023-24540 Improper handling of JavaScript whitespace in html/template
Sources
Also known as ALSA-2026:38493, ALSA-2026:38494, ALSA-2026:38495, ALSA-2026:38878, AZL-92303, AZL-92309 and 1812 more.