{"id":"CVE-2026-39822","state":"PUBLISHED","title":"Root escape via symlink plus trailing slash in os","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.","publishedAt":"2026-07-08T15:46:27.199Z","updatedAt":"2026-07-08T19:39:17.341Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"CISA-ADP"},"assigner":"Go","products":["Go standard library os"],"affected":[{"vendor":"Go standard library","product":"os","packageName":"os","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"1.25.12","versionType":"semver"},{"version":"1.26.0-0","status":"affected","lessThan":"1.26.5","versionType":"semver"},{"version":"1.27.0-0","status":"affected","lessThan":"1.27.0-rc.2","versionType":"semver"}],"collectionURL":"https://pkg.go.dev","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"}]}],"references":["https://go.dev/issue/79005","https://groups.google.com/g/golang-announce/c/OrmQE_Yp5Sc","https://go.dev/cl/797880","https://pkg.go.dev/vuln/GO-2026-4970"],"weaknesses":["CWE-61"],"ingestedAt":"2026-10-29T20:11:50.837Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/39xxx/CVE-2026-39822.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-39822","state":"PUBLISHED","datePublished":"2026-07-08T15:46:27.199Z","dateUpdated":"2026-07-08T19:39:17.341Z","assignerShortName":"Go","assignerOrgId":"1bb62c36-49e3-4200-9d77-64a1400537cc","dateReserved":"2026-04-07T18:13:03.527Z"},"containers":{"cna":{"title":"Root escape via symlink plus trailing slash in os","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."}],"affected":[{"vendor":"Go standard library","product":"os","packageName":"os","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"1.25.12","versionType":"semver"},{"version":"1.26.0-0","status":"affected","lessThan":"1.26.5","versionType":"semver"},{"version":"1.27.0-0","status":"affected","lessThan":"1.27.0-rc.2","versionType":"semver"}],"collectionURL":"https://pkg.go.dev","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"}]}],"references":[{"url":"https://go.dev/issue/79005"},{"url":"https://groups.google.com/g/golang-announce/c/OrmQE_Yp5Sc"},{"url":"https://go.dev/cl/797880"},{"url":"https://pkg.go.dev/vuln/GO-2026-4970"}],"problemTypes":[{"descriptions":[{"lang":"en","description":"CWE-61: UNIX Symbolic Link (Symlink) Following"}]}],"providerMetadata":{"shortName":"Go","orgId":"1bb62c36-49e3-4200-9d77-64a1400537cc","dateUpdated":"2026-07-08T15:46:27.199Z"},"credits":[{"lang":"en","value":"Mundur (https://github.com/M0nd0R)"}]},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.8,"attackVector":"LOCAL","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","integrityImpact":"HIGH","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"timestamp":"2026-07-08T18:06:16.360721Z","id":"CVE-2026-39822","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-61","type":"CWE","lang":"en","description":"CWE-61 UNIX Symbolic Link (Symlink) Following"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-07-08T19:39:17.341Z"}}]}}}