What’s Vulnerable › Vulnerabilities
CVE-2026-39822: Root escape via symlink plus trailing slash in os
- Severity: high (CVSS 7.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.2% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2026-07-08 · updated 2026-10-25
- Weakness: CWE-61
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.
Affected products
- Go: from 1.24.0 before 1.25.12; from 1.26.0 before 1.26.5; 1.27-rc1 — fixed in 1.25.12, 1.26.5
- Go Stdlib: before 1.25.12; from 1.26.0-0 before 1.26.5; from 1.27.0-0 before 1.27.0-rc.2 — fixed in 1.25.12, 1.26.5, 1.27.0-rc.2
How to fix
Upgrade to a fixed version: Go 1.25.12, 1.26.5; Go Stdlib 1.25.12, 1.26.5, 1.27.0-rc.2. Check the vendor advisory for mitigations.
References
- https://go.dev/cl/797880
- https://go.dev/issue/79005
- https://groups.google.com/g/golang-announce/c/OrmQE_Yp5Sc
- https://pkg.go.dev/vuln/GO-2026-4970
Get alerted when CVE-2026-39822 or the next vulnerability affects your stack