cve-2026-39822

HIGH CVSS 7.8 nvd
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.

Timeline
Published
2026-07-08
Last Modified
2026-09-17
CVSS Details
Attack Vector
LOCAL
Attack Complexity
LOW
Privileges Required
LOW
Affected Products
  • golang go
Weaknesses (CWE)
CVSS metrics
Version Base Severity Vector Exploitability Impact Source
3.1 7.8 HIGH CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H 1.8 5.9 134c704f-9b21-4f2e-91b3-4a467353bcc0
CPE configurations
OR
CPE Version range Vulnerable
cpe:2.3:a:golang:go:*:*:*:*:*:*:*:* >= 1.24.0, < 1.25.12 yes
cpe:2.3:a:golang:go:*:*:*:*:*:*:*:* >= 1.26.0, < 1.26.5 yes
cpe:2.3:a:golang:go:1.27:rc1:*:*:*:*:*:* — yes
NVD metadata
NVD status
Analyzed
Source identifier
security@golang.org
References
Linked Vulnerabilities

{
  "cvss": 7.8,
  "datePublished": "2026-07-08T17:17:21.310",
  "dateUpdated": "2026-09-17T17:10:20.047",
  "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.",
  "id": "CVE-2026-39822",
  "raw": {
    "affected": [
      {
        "affectedData": [
          {
            "collectionURL": "https://pkg.go.dev",
            "defaultStatus": "unaffected",
            "packageName": "os",
            "product": "os",
            "programRoutines": [
              {
                "name": "rootOpenFileNolog"
              },
              {
                "name": "openRootInRoot"
              },
              {
                "name": "OpenInRoot"
              },
              {
                "name": "Root.Create"
              },
              {
                "name": "Root.Open"
              },
              {
                "name": "Root.OpenFile"
              },
              {
                "name": "Root.OpenRoot"
              },
              {
                "name": "Root.ReadFile"
              },
              {
                "name": "Root.WriteFile"
              },
              {
                "name": "rootFS.Open"
              },
              {
                "name": "rootFS.ReadDir"
              },
              {
                "name": "rootFS.ReadFile"
              }
            ],
            "vendor": "Go standard library",
            "versions": [
              {
                "lessThan": "1.25.12",
                "status": "affected",
                "version": "0",
                "versionType": "semver"
              },
              {
                "lessThan": "1.26.5",
                "status": "affected",
                "version": "1.26.0-0",
                "versionType": "semver"
              },
              {
                "lessThan": "1.27.0-rc.2",
                "status": "affected",
                "version": "1.27.0-0",
                "versionType": "semver"
              }
            ]
          }
        ],
        "source": "security@golang.org"
      }
    ],
    "configurations": [
      {
        "nodes": [
          {
            "cpeMatch": [
              {
                "criteria": "cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*",
                "matchCriteriaId": "4E50284C-BE19-4F62-ABAE-B78B6BECDF49",
                "versionEndExcluding": "1.25.12",
                "versionStartIncluding": "1.24.0",
                "vulnerable": true
              },
              {
                "criteria": "cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*",
                "matchCriteriaId": "08CDCAED-0C22-42D9-97A8-77F19DEECDB2",
                "versionEndExcluding": "1.26.5",
                "versionStartIncluding": "1.26.0",
                "vulnerable": true
              },
              {
                "criteria": "cpe:2.3:a:golang:go:1.27:rc1:*:*:*:*:*:*",
                "matchCriteriaId": "1062DCC7-46FE-4CF5-ADEF-BEC03F8AB39E",
                "vulnerable": true
              }
            ],
            "negate": false,
            "operator": "OR"
          }
        ]
      }
    ],
    "cveTags": [],
    "descriptions": [
      {
        "lang": "en",
        "value": "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."
      }
    ],
    "id": "CVE-2026-39822",
    "lastModified": "2026-09-17T17:10:20.047",
    "metrics": {
      "cvssMetricV31": [
        {
          "cvssData": {
            "attackComplexity": "LOW",
            "attackVector": "LOCAL",
            "availabilityImpact": "HIGH",
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "confidentialityImpact": "HIGH",
            "integrityImpact": "HIGH",
            "privilegesRequired": "LOW",
            "scope": "UNCHANGED",
            "userInteraction": "NONE",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "exploitabilityScore": 1.8,
          "impactScore": 5.9,
          "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "type": "Secondary"
        }
      ],
      "ssvcV203": [
        {
          "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "ssvcData": {
            "id": "CVE-2026-39822",
            "options": [
              {
                "exploitation": "none"
              },
              {
                "automatable": "no"
              },
              {
                "technicalImpact": "total"
              }
            ],
            "role": "CISA Coordinator",
            "timestamp": "2026-07-08T18:06:16.360721Z",
            "version": "2.0.3"
          }
        }
      ]
    },
    "published": "2026-07-08T17:17:21.310",
    "references": [
      {
        "source": "security@golang.org",
        "tags": [
          "Patch"
        ],
        "url": "https://go.dev/cl/797880"
      },
      {
        "source": "security@golang.org",
        "tags": [
          "Issue Tracking",
          "Patch"
        ],
        "url": "https://go.dev/issue/79005"
      },
      {
        "source": "security@golang.org",
        "tags": [
          "Mailing List",
          "Patch",
          "Vendor Advisory"
        ],
        "url": "https://groups.google.com/g/golang-announce/c/OrmQE_Yp5Sc"
      },
      {
        "source": "security@golang.org",
        "tags": [
          "Vendor Advisory"
        ],
        "url": "https://pkg.go.dev/vuln/GO-2026-4970"
      }
    ],
    "sourceIdentifier": "security@golang.org",
    "vulnStatus": "Analyzed",
    "weaknesses": [
      {
        "description": [
          {
            "lang": "en",
            "value": "CWE-61"
          }
        ],
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "type": "Secondary"
      }
    ]
  },
  "severity": "HIGH",
  "source": "nvd",
  "title": "On Unix systems, opening a file in an os.Root improperly follows symlinks to locations outside of the Root when the f..."
}
View JSON API Download JSON