You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I discovered that there is a path traversal vulnerability with static files. Here is a [repository](https://github.com/Maeeen/cask-static-path-traversal-issue) that showcases the issue. In `StaticUtil` (`StaticEndpoints.scala`), the `ctx.remainingPathSegments` is not properly sanitized and is priorly decoded in `Main.scala`. Therefore, if a static endpoint has a remaining path segment having `/` (e.g. if a client sends a `static/..%2F/hi.txt`), `filter` will fail to filter the `..` and the path `static/../hi.txt` will be returned to get returned to the client, which should be prohibited.
0 commit comments