High severity · published Jul 8, 2026
CVE-2026-39822
Root escape via symlink plus trailing slash in os
7.8
CVSS
0.2%
EPSS
No
On KEV
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.
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack vector
Local
Complexity
Low
Privileges
Low
User interaction
None
Confidentiality
High
Integrity
High
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.2% · higher than 14% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
OS
os · Go standard library
before 1.25.12; 1.26.0-0 before 1.26.5; 1.27.0-0 before 1.27.0-rc.2 · source: vendor
GO
GO · Golang
1.24.0 before 1.25.12; 1.26.0 before 1.26.5; 1.27 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-39822
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-39822
Patch
https://go.dev/cl/797880
Issue Tracking
https://go.dev/issue/79005
Mailing List
https://groups.google.com/g/golang-announce/c/OrmQE_Yp5Sc
Vendor Advisory
https://pkg.go.dev/vuln/GO-2026-4970
More from os
9.8
CVE-2026-56857
Root.Mkdir(All) can follow junctions out of the root on Windows in os
3.8
CVE-2025-22873
Improper access to parent directory of root in os
2.5
CVE-2026-27139
FileInfo can escape from a Root in os
