GHSA-6xv5-86q9-7xr8Medium▾ SunlitSecureJoin: on windows, paths outside of the rootfs could be inadvertently produced
▾ Sunlit zone — Low / medium · no exploitation signal
impact 27.5 · likelihood 0 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via OSV
Last analysed / modified upstream
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).
c121231e1276e11049547bee5ce68d5a2cfe2d9b is the patch fixing this issue. v0.2.4 contains the fix.
Users could use filepath.FromSlash() on all unsafe paths before passing them to filepath-securejoin.
See #9.
github.com/cyphar/filepath-securejoin < 0.2.4Upgrade to a patched release:
github.com/cyphar/filepath-securejoin 0.2.4