os: UNIX Symbolic Link (Symlink) Following
CVE-2026-39822 is a high-severity UNIX symbolic link (symlink) following vulnerability in os from Go standard library, with a CVSS 3.1 base score of 7.8 out of 10. It can be exploited with local access to the system by an attacker with a low-privileged account, without any action from a user. The record lists versions 1.25.12, 1.26.5, 1.27.0-rc.2 as the first without the flaw, so updating os to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.23% chance of exploitation within 30 days, which is low compared with other CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update os to 1.25.12 or 1.26.5 or 1.27.0-rc.2, whichever matches your release line, or a later version.
- Update Go to 1.25.12 or 1.26.5, whichever matches your release line, or a later version.
- Read the advisory on groups.google.com for workarounds and exact fixed builds.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Go standard library | os | before 1.25.12; 1.26.0-0 up to, but not including, 1.26.5; 1.27.0-0 up to, but not including, 1.27.0-rc.2 | 1.25.12, 1.26.5, 1.27.0-rc.2 |
| Go | Go | 1.24.0 up to, but not including, 1.25.12; 1.26.0 up to, but not including, 1.26.5; 1.27 | 1.25.12, 1.26.5 |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- LocalThe attacker needs local access or must trick a user into running something.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- LowA basic user account is enough.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. Scored by CISA (ADP).
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.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: UNIX Symbolic Link (Symlink) Following
The product, when opening a file or directory, does not sufficiently account for when the file is a symbolic link that resolves to a target outside of the intended control sphere. This could allow an attacker to cause the product to operate on unauthorized files.
How developers prevent this class of flaw
- Symbolic link attacks often occur when a program creates a tmp directory that stores files/links. Access to the directory should be restricted to the program as to prevent attackers from manipulating the files.
- Follow the principle of least privilege when assigning access rights to entities in a software system. Denying access to a file can prevent an attacker from replacing that file with a link to a sensitive file. Ensure good compartmentalization in the system to provide protected areas that can be trusted.
More UNIX Symbolic Link (Symlink) Following vulnerabilities (CWE-61)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Advisories
Patches and release notes
- go.dev/cl/797880
- go.dev/issue/79005Issue Tracking
Other vulnerabilities in os
- 9.8 Critical severity
- 7.5 High severity
Recent UNIX Symbolic Link (Symlink) Following vulnerabilities
- 7.3 High severity
- 9.6 Critical severity
- 7.8 High severity
- 8.3 High severity
- 8.5 High severity
- 7.2 High severity
Spotted an error? Tell us.