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.
Published: 2026-07-08
Score: 7.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability allows a Unix system that uses Go’s standard library os package to escape a constrained root context when the final component of the path is a symbolic link ending with a trailing slash. The resolution of the path follows the symlink outside the intended root, providing an attacker the ability to read or modify files that should be protected, thereby undermining confidentiality and integrity. This flaw is identified as a path traversal weakness (CWE‑59, CWE‑61).

Affected Systems

All Go releases that have not yet applied the patch identified as GO‑2026‑4970 are vulnerable. Any Go application that imports or relies on os.Root.Open on Unix environments could be exposed when code constructs paths ending with a trailing slash to a symlink resolved through os.Root.Open.

Risk and Exploitability

The CVSS score of 7.8 indicates high severity. The EPSS score is reported as < 1%, meaning exploitation probability is very low but not zero. The vulnerability is not listed in CISA KEV. A likely attack scenario requires an attacker to influence the path argument provided to os.Root.Open—this is plausible in applications that accept user‑controlled or externally supplied file paths. Once the path is resolved via the symlink and read or modifies files outside the intended root, it can lead to compromise of application data and escalation of privileges if the application runs with elevated rights.

Generated by OpenCVE AI on July 29, 2026 at 13:56 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to a Go release that includes the GO‑2026‑4970 patch for os.Root.Open.
  • Because the flaw is a file‑path traversal indicated by CWE‑61, validate all paths passed to os.Root.Open: reject or trim any path ending with a trailing slash when the last component is a symlink, or use a canonicalization routine that does not follow symlinks outside the intended root.
  • Limit the usage of os.Root.Open to controlled, hardened code paths; run the application with the least privilege necessary, and if possible, avoid using os.Root.Open in user‑controllable code locations.

Generated by OpenCVE AI on July 29, 2026 at 13:56 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 10 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-59
References
Metrics threat_severity

None

threat_severity

Important


Wed, 08 Jul 2026 20:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-61
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Wed, 08 Jul 2026 17:45:00 +0000

Type Values Removed Values Added
First Time appeared Go Standard Library
Go Standard Library os
Vendors & Products Go Standard Library
Go Standard Library os

Wed, 08 Jul 2026 16:30:00 +0000

Type Values Removed Values Added
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.
Title Root escape via symlink plus trailing slash in os
References

Subscriptions

Go Standard Library Os
cve-icon MITRE

Status: PUBLISHED

Assigner: Go

Published:

Updated: 2026-07-08T19:39:17.341Z

Reserved: 2026-04-07T18:13:03.527Z

Link: CVE-2026-39822

cve-icon Vulnrichment

Updated: 2026-07-08T18:05:38.120Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Important

Publid Date: 2026-07-08T15:46:27Z

Links: CVE-2026-39822 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-29T14:00:03Z

Weaknesses
  • CWE-59

    Improper Link Resolution Before File Access ('Link Following')

  • CWE-61

    UNIX Symbolic Link (Symlink) Following