HSEC-2025-0004
Not scored
Broken Path Sanitization in spacecookie Library
- Severity
- Not scored
- Published
- Last changed
Description
Broken Path Sanitization in spacecookie Library
The spacecookie library exposes the functions sanitizePath and sanitizeIfNotUrl intended to
remove .. components from paths which can be used to prevent path traversal attacks. Due to
erroneous comparison code, this elimination is not actually performed which has been remedied
in version 1.0.0.3 by properly comparing using equalFilePath.
Any user of those respective functions of any version of spacecookie should upgrade to 1.0.0.3
or later. Note that the spacecookie server executable included in the same package is not affected
by the problem since a separate check would reject any malicious path that gets by sanitizePath.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| spacecookie (Hackage) | from 0.2.0.0 before 1.0.0.3 | Haskell Security Advisories |
References
Sources
| Source | Record | Licence |
|---|---|---|
| Haskell Security Advisories | HSEC-2025-0004 changed 2025-11-14 | CC0-1.0 |