{"id":"GHSA-6xv5-86q9-7xr8","aliases":["GHSA-6xv5-86q9-7xr8","GO-2023-2048"],"related":["CGA-fxxh-rjv6-mj6m"],"kind":"vulnerability","state":"published","title":"SecureJoin: on windows, paths outside of the rootfs could be inadvertently produced","summary":"### Impact\nFor Windows users of `github.com/cyphar/filepath-securejoin`, until v0.2.4 it was possible for certain rootfs and path combinations (in particular, where a malicious Unix-style `/`-separated unsafe path was used with a Windows-style rootfs path) to result in generated paths that were outside of the provided rootfs.\n\nIt is unclear to what extent this has a practical impact on real users, but given the possible severity of the issue we have released an emergency patch release that resolves this issue.\n\nThanks to  @pjbgf for discovering, debugging, and fixing this issue (as well as writing some tests for it).\n\n### Patches\nc121231e1276e11049547bee5ce68d5a2cfe2d9b is the patch fixing this issue. v0.2.4 contains the fix.\n\n### Workarounds\nUsers could use `filepath.FromSlash()` on all unsafe paths before passing them to `filepath-securejoin`.\n\n### References\nSee #9.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"### Impact\nFor Windows users of `github.com/cyphar/filepath-securejoin`, until v0.2.4 it was possible for certain rootfs and path combinations (in particular, where a malicious Unix-style `/`-separated unsafe path was used with a Windows-style rootfs path) to result in generated paths that were outside of the provided rootfs.\n\nIt is unclear to what extent this has a practical impact on real users, but given the possible severity of the issue we have released an emergency patch release that resolves this issue.\n\nThanks to  @pjbgf for discovering, debugging, and fixing this issue (as well as writing some tests for it).\n\n### Patches\nc121231e1276e11049547bee5ce68d5a2cfe2d9b is the patch fixing this issue. v0.2.4 contains the fix.\n\n### Workarounds\nUsers could use `filepath.FromSlash()` on all unsafe paths before passing them to `filepath-securejoin`.\n\n### References\nSee #9.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Certain rootfs and path combinations result in generated paths that are outside of the provided rootfs on Windows.","format":"markdown","source":"go"}],"published":"2023-09-07T12:58:58.000Z","modified":"2026-09-10T03:49:57.965Z","severity":{"scorer":"GitHub","scheme":"rating","rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"rating","rating":"MEDIUM"}],"cwes":[],"affected":[{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.2.4"}],"ecosystem":"Go","package":"github.com/cyphar/filepath-securejoin","purl":"pkg:golang/github.com/cyphar/filepath-securejoin","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.2.4"}],"ecosystem":"Go","package":"github.com/cyphar/filepath-securejoin","purl":"pkg:golang/github.com/cyphar/filepath-securejoin","source":"go"}],"references":[{"url":"https://github.com/cyphar/filepath-securejoin/security/advisories/GHSA-6xv5-86q9-7xr8","tags":["advisory","web"],"sources":["ghsa","go"]},{"url":"https://github.com/cyphar/filepath-securejoin/pull/9","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/cyphar/filepath-securejoin/commit/c121231e1276e11049547bee5ce68d5a2cfe2d9b","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://github.com/cyphar/filepath-securejoin","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/cyphar/filepath-securejoin/releases/tag/v0.2.4","tags":["web"],"sources":["ghsa"]}],"credits":["@pjbgf"],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-6xv5-86q9-7xr8","url":"https://github.com/advisories/GHSA-6xv5-86q9-7xr8","licence":"CC-BY-4.0","modified":"2026-09-10T03:49:57.965Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2023-2048","url":"https://pkg.go.dev/vuln/GO-2023-2048","licence":"CC-BY-4.0","modified":"2026-02-04T04:10:21.741Z"}],"updatedAt":"2026-11-25T22:56:23.559Z"}