What’s Vulnerable › Vulnerabilities

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

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

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

Get alerted when CVE-2026-39822 or the next vulnerability affects your stack