CVE-2026-39822

GO-2026-4970 · published 7 Jul 2026 · updated 14 Nov 2026

Root escape via symlink plus trailing slash in os

7.8HighCVSS 7.8EPSS 0%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in 1.25.12, 1.26.5, 1.27.0-rc.2 and 1 more.

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.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
Go standard library<1.25.12, >=1.26.0-0 <1.26.5, >=1.27.0-0 <1.27.0-rc.21.25.12, 1.26.5, 1.27.0-rc.2
go: stdlib>=1.27.0-0 <1.27.0-rc.21.27.0-rc.2

Timeline

Every event on this vulnerability

Related

Other vulnerabilities in stdlib (Go), strongest first

Embed

A live severity badge for an advisory, README or ticket

CVE-2026-39822 severity on Zeptric[![CVE-2026-39822](https://zeptric.io/badge/cve/CVE-2026-39822.svg)](https://zeptric.io/cve/CVE-2026-39822)