CVE-2026-39822 Root escape via symlink plus trailing slash in os

High 7.8 Published Updated

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.

PackageAffectedFixed in
golang BitnamiAll versions1.25.12, 1.26.5, 1.27.0
stdlib GoAll versions1.25.12, 1.26.5, 1.27.0-rc.2
Linux distribution packages (38)
buildah AlmaLinux:10All versions2:1.43.1-4.el10_2
buildah-tests AlmaLinux:10All versions2:1.43.1-4.el10_2
podman AlmaLinux:10All versions7:5.8.2-5.el10_2.alma.1
podman-docker AlmaLinux:10All versions7:5.8.2-5.el10_2.alma.1
podman-remote AlmaLinux:10All versions7:5.8.2-5.el10_2.alma.1
podman-tests AlmaLinux:10All versions7:5.8.2-5.el10_2.alma.1
buildah AlmaLinux:9All versions2:1.43.1-4.el9_8
buildah-tests AlmaLinux:9All versions2:1.43.1-4.el9_8
podman AlmaLinux:9All versions6:5.8.2-5.el9_8
podman-docker AlmaLinux:9All versions6:5.8.2-5.el9_8
podman-plugins AlmaLinux:9All versions6:5.8.2-5.el9_8
podman-remote AlmaLinux:9All versions6:5.8.2-5.el9_8
podman-tests AlmaLinux:9All versions6:5.8.2-5.el9_8
buildah Red Hat:enterprise_linux:10.2All versions2:1.43.1-4.el10_2
buildah-debuginfo Red Hat:enterprise_linux:10.2All versions2:1.43.1-4.el10_2
buildah-debugsource Red Hat:enterprise_linux:10.2All versions2:1.43.1-4.el10_2
buildah-tests Red Hat:enterprise_linux:10.2All versions2:1.43.1-4.el10_2
buildah-tests-debuginfo Red Hat:enterprise_linux:10.2All versions2:1.43.1-4.el10_2
podman Red Hat:enterprise_linux:10.2All versions7:5.8.2-5.el10_2
podman-debuginfo Red Hat:enterprise_linux:10.2All versions7:5.8.2-5.el10_2
podman-debugsource Red Hat:enterprise_linux:10.2All versions7:5.8.2-5.el10_2
podman-docker Red Hat:enterprise_linux:10.2All versions7:5.8.2-5.el10_2
podman-remote Red Hat:enterprise_linux:10.2All versions7:5.8.2-5.el10_2
podman-remote-debuginfo Red Hat:enterprise_linux:10.2All versions7:5.8.2-5.el10_2
podman-tests Red Hat:enterprise_linux:10.2All versions7:5.8.2-5.el10_2
podman-tests-debuginfo Red Hat:enterprise_linux:10.2All versions7:5.8.2-5.el10_2
buildah Red Hat:enterprise_linux:9::appstreamAll versions2:1.43.1-4.el9_8
buildah-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions2:1.43.1-4.el9_8
buildah-debugsource Red Hat:enterprise_linux:9::appstreamAll versions2:1.43.1-4.el9_8
buildah-tests Red Hat:enterprise_linux:9::appstreamAll versions2:1.43.1-4.el9_8
buildah-tests-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions2:1.43.1-4.el9_8
podman Red Hat:enterprise_linux:9::appstreamAll versions6:5.8.2-5.el9_8
podman-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions6:5.8.2-5.el9_8
podman-debugsource Red Hat:enterprise_linux:9::appstreamAll versions6:5.8.2-5.el9_8
podman-docker Red Hat:enterprise_linux:9::appstreamAll versions6:5.8.2-5.el9_8
podman-plugins Red Hat:enterprise_linux:9::appstreamAll versions6:5.8.2-5.el9_8
podman-plugins-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions6:5.8.2-5.el9_8
podman-remote Red Hat:enterprise_linux:9::appstreamAll versions6: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.

All Golang Go vulnerabilities

Sources

Also known as ALSA-2026:38493, ALSA-2026:38494, ALSA-2026:38495, ALSA-2026:38878, AZL-92303, AZL-92309 and 1812 more.

Is CVE-2026-39822 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free