# GHSA-6xv5-86q9-7xr8: SecureJoin: on windows, paths outside of the rootfs could be inadvertently produced

- Severity: Medium (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2023-09-07T12:58:58.000Z
- Modified: 2026-09-10T03:49:57.965Z
- Also known as: GO-2023-2048
- Related: CGA-fxxh-rjv6-mj6m

## Description

### Impact
For 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.

It 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.

Thanks to  @pjbgf for discovering, debugging, and fixing this issue (as well as writing some tests for it).

### Patches
c121231e1276e11049547bee5ce68d5a2cfe2d9b is the patch fixing this issue. v0.2.4 contains the fix.

### Workarounds
Users could use `filepath.FromSlash()` on all unsafe paths before passing them to `filepath-securejoin`.

### References
See #9.

(As written by GitHub Advisory Database.)

## Affected

- github.com/cyphar/filepath-securejoin (Go): before 0.2.4

## References

- <https://github.com/cyphar/filepath-securejoin/security/advisories/GHSA-6xv5-86q9-7xr8> (advisory, web)
- <https://github.com/cyphar/filepath-securejoin/pull/9> (web)
- <https://github.com/cyphar/filepath-securejoin/commit/c121231e1276e11049547bee5ce68d5a2cfe2d9b> (fix, web)
- <https://github.com/cyphar/filepath-securejoin> (package)
- <https://github.com/cyphar/filepath-securejoin/releases/tag/v0.2.4> (web)

## Sources

- GitHub Advisory Database: [GHSA-6xv5-86q9-7xr8](https://github.com/advisories/GHSA-6xv5-86q9-7xr8), CC-BY-4.0, modified 2026-09-10
- Go Vulnerability Database: [GO-2023-2048](https://pkg.go.dev/vuln/GO-2023-2048), CC-BY-4.0, modified 2026-02-04

---

Page: https://cve.day/GHSA-6xv5-86q9-7xr8 · Whole record: https://cve.day/GHSA-6xv5-86q9-7xr8.json · Rebuilt by cve.day 2026-11-25T22:56:23.559Z
