CVE-2026-39822
JSON

7.8high

Root escape via symlink plus trailing slash in os

Severity
7.8high CVSS:3.1 by CISA-ADP
Exploit likelihood
0.22% (higher than 13% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Go
Also known as
GO-2026-4970BIT-GOLANG-2026-39822

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

Product or packageVersionsReported by
osbefore 1.25.12, from 1.26.0-0 before 1.26.5, from 1.27.0-0 before 1.27.0-rc.2CVE List
stdlib (Go)before 1.25.12, from 1.26.0-0 before 1.26.5, from 1.27.0-0 before 1.27.0-rc.2Go Vulnerability Database
golang gofrom 1.24.0 before 1.25.12, from 1.26.0 before 1.26.5, 1.27NVD
golang (Bitnami)before 1.25.12, from 1.26.0-0 before 1.26.5, from 1.27.0-0 before 1.27.0Bitnami Vulnerability Database

All scores

CISA-ADP7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Bitnami Vulnerability Databasehigh rating

Classification

CWE-61

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

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.

NVD (es)

En sistemas Unix, abrir un archivo en un os.Root sigue incorrectamente los enlaces simbólicos a ubicaciones fuera del Root cuando el componente final de una ruta es un enlace simbólico y la ruta termina en /. Por ejemplo, ’root.Open(“symlink/”)’ abrirá “symlink” incluso cuando “symlink” es un enlace simbólico que apunta fuera de la raíz.

References

Related

Sources

SourceRecordLicence
CVE ListCVE-2026-39822 changed 2026-07-08CVE Terms of Use
Go Vulnerability DatabaseGO-2026-4970 changed 2026-11-23CC-BY-4.0
NVDCVE-2026-39822 changed 2026-10-25Public domain
Bitnami Vulnerability DatabaseBIT-GOLANG-2026-39822 changed 2026-09-08Apache-2.0