{"id":"CVE-2026-39822","revision":"5bbde10616174bc1ba19d1d0c1abae8e","records":[{"revision":"5bbde10616174bc1ba19d1d0c1abae8e","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-39822","aliases":[],"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.","state":0,"publishedAt":"2026-07-08T15:46:27.199+00:00","modifiedAt":"2026-07-08T19:39:17.341+00:00","affected":[{"ecosystem":"https://pkg.go.dev","name":"os","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"Go standard library\",\n                    \"product\": \"os\",\n                    \"collectionURL\": \"https://pkg.go.dev\",\n                    \"packageName\": \"os\",\n                    \"versions\": [\n                        {\n                            \"version\": \"0\",\n                            \"lessThan\": \"1.25.12\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"1.26.0-0\",\n                            \"lessThan\": \"1.26.5\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"1.27.0-0\",\n                            \"lessThan\": \"1.27.0-rc.2\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\"\n                        }\n                    ],\n                    \"programRoutines\": [\n                        {\n                            \"name\": \"rootOpenFileNolog\"\n                        },\n                        {\n                            \"name\": \"openRootInRoot\"\n                        },\n                        {\n                            \"name\": \"OpenInRoot\"\n                        },\n                        {\n                            \"name\": \"Root.Create\"\n                        },\n                        {\n                            \"name\": \"Root.Open\"\n                        },\n                        {\n                            \"name\": \"Root.OpenFile\"\n                        },\n                        {\n                            \"name\": \"Root.OpenRoot\"\n                        },\n                        {\n                            \"name\": \"Root.ReadFile\"\n                        },\n                        {\n                            \"name\": \"Root.WriteFile\"\n                        },\n                        {\n                            \"name\": \"rootFS.Open\"\n                        },\n                        {\n                            \"name\": \"rootFS.ReadDir\"\n                        },\n                        {\n                            \"name\": \"rootFS.ReadFile\"\n                        }\n                    ],\n                    \"defaultStatus\": \"unaffected\"\n                }"}],"metrics":[],"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"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-39822","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-39822","identifiers":["CVE-2026-39822"]},"retained":false,"historicalAffected":[]}],"coverage":[]}