---
id: CVE-2026-39822
title: >-
  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 /
summary: >-
  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 o…
severity: high
cvss: 7.8
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'
cwe:
  - CWE-61
  - CWE-59
vendor: golang
product: go
affected:
  - 'go >= 1.24.0, < 1.25.12'
  - 'go >= 1.26.0, < 1.26.5'
  - go = 1.27
patched:
  - go 1.26.5
published: '2026-07-08'
updated: '2026-09-17'
sourceUpdated: '2026-09-17T17:10:20.047'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-39822'
references:
  - url: 'https://go.dev/cl/797880'
    label: security@golang.org
  - url: 'https://go.dev/issue/79005'
    label: security@golang.org
  - url: 'https://groups.google.com/g/golang-announce/c/OrmQE_Yp5Sc'
    label: security@golang.org
  - url: 'https://pkg.go.dev/vuln/GO-2026-4970'
    label: security@golang.org
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-39822.json
  - url: 'https://access.redhat.com/security/cve/CVE-2026-39822'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2498152'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-39822'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-39822'
  - url: 'https://access.redhat.com/errata/RHSA-2026:66350'
  - url: 'https://access.redhat.com/errata/RHSA-2026:66375'
  - url: 'https://access.redhat.com/errata/RHSA-2026:57361'
  - url: 'https://access.redhat.com/errata/RHSA-2026:49702'
  - url: 'https://access.redhat.com/errata/RHSA-2026:38494'
  - url: 'https://access.redhat.com/errata/RHSA-2026:37436'
  - url: 'https://access.redhat.com/errata/RHSA-2026:38995'
  - url: 'https://access.redhat.com/errata/RHSA-2026:61253'
  - url: 'https://access.redhat.com/errata/RHSA-2026:57649'
  - url: 'https://access.redhat.com/errata/RHSA-2026:49712'
  - url: 'https://access.redhat.com/errata/RHSA-2026:38493'
  - url: 'https://access.redhat.com/errata/RHSA-2026:37435'
  - url: 'https://access.redhat.com/errata/RHSA-2026:38878'
  - url: 'https://access.redhat.com/errata/RHSA-2026:59202'
  - url: 'https://access.redhat.com/errata/RHSA-2026:59203'
  - url: 'https://access.redhat.com/errata/RHSA-2026:48891'
  - url: 'https://access.redhat.com/errata/RHSA-2026:36510'
  - url: 'https://access.redhat.com/errata/RHSA-2026:36477'
  - url: 'https://access.redhat.com/errata/RHSA-2026:54773'
  - url: 'https://access.redhat.com/errata/RHSA-2026:44624'
  - url: 'https://access.redhat.com/errata/RHSA-2026:53520'
  - url: 'https://access.redhat.com/errata/RHSA-2026:52968'
  - url: 'https://access.redhat.com/errata/RHSA-2026:50931'
tags:
  - nvd
  - osv
  - go
  - csaf
  - vex
  - red-hat
epss: 0.00182
epssPercentile: 0.0691
aliases:
  - GO-2026-4970
  - BIT-golang-2026-39822
ecosystem: go
ingestedAt: '2026-07-09T18:56:37.033Z'
---

## Overview

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

- `go >= 1.24.0, < 1.25.12`
- `go >= 1.26.0, < 1.26.5`
- `go = 1.27`

## Remediation

Upgrade past the affected range:

- `go 1.26.5`

## Package advisory (CVE-2026-39822)

Affected packages:

- `stdlib >= 1.27.0-0, < 1.27.0-rc.2`

Patched in:

- `stdlib 1.27.0-rc.2`

Source: https://osv.dev/vulnerability/GO-2026-4970

## Vendor advisories

- **RHSA-2026:66350** · Red Hat · fixed in: Red Hat OpenShift Container Platform 4.21 · released 2026-09-15 · [advisory](https://access.redhat.com/errata/RHSA-2026:66350)
- **RHSA-2026:66375** · Red Hat · fixed in: Red Hat OpenShift Container Platform 4.20 · released 2026-09-15 · [advisory](https://access.redhat.com/errata/RHSA-2026:66375)
- **RHSA-2026:57361** · Red Hat · fixed in: Red Hat OpenShift Container Platform 4.22 · released 2026-08-25 · [advisory](https://access.redhat.com/errata/RHSA-2026:57361)
- **RHSA-2026:49702** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream EUS (v. 10.0) · released 2026-08-03 · [advisory](https://access.redhat.com/errata/RHSA-2026:49702)
- **RHSA-2026:38494** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream (v. 10) · released 2026-07-13 · [advisory](https://access.redhat.com/errata/RHSA-2026:38494)
- **RHSA-2026:37436** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream (v. 10) · released 2026-07-09 · [advisory](https://access.redhat.com/errata/RHSA-2026:37436)
- **RHSA-2026:38995** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream (v. 8) · released 2026-07-13 · [advisory](https://access.redhat.com/errata/RHSA-2026:38995)
- **RHSA-2026:61253** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream E4S (v.9.2) · released 2026-08-31 · [advisory](https://access.redhat.com/errata/RHSA-2026:61253)
- **RHSA-2026:57649** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream E4S (v.9.4) · released 2026-08-20 · [advisory](https://access.redhat.com/errata/RHSA-2026:57649)
- **RHSA-2026:49712** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream EUS (v.9.6) · released 2026-08-03 · [advisory](https://access.redhat.com/errata/RHSA-2026:49712)
- **RHSA-2026:38493** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream (v. 9) · released 2026-07-13 · [advisory](https://access.redhat.com/errata/RHSA-2026:38493)
- **Red Hat VEX** · Important · affected: Compliance Operator, ExternalDNS Operator, File Integrity Operator, Logging Subsystem for Red Hat OpenShift, Multicluster Engine for Kubernetes, Red Hat Advanced Cluster Management for Kubernetes 2, … · no fix planned: Red Hat Ceph Storage 7, Red Hat Ceph Storage 8, Compliance Operator, ExternalDNS Operator, … · updated 2026-09-24 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-39822.json)
- **RHSA-2026:37435** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream (v. 9) · released 2026-07-09 · [advisory](https://access.redhat.com/errata/RHSA-2026:37435)
- **RHSA-2026:38878** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream (v. 9) · released 2026-07-13 · [advisory](https://access.redhat.com/errata/RHSA-2026:38878)
