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
Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord
simonbrandhof
changed the title
🐛 [Bug]: internal error on static path with ".."
🐛 [Bug]: internal error on static path prefix ending with ".."
Dec 8, 2024
Bug Description
A request to a path handled by a static router generates an internal server error if the requested path matches the router "prefix" suffixed with
..
.For example if the router prefix is
/css
, the requests to/css../*
return the 500 error code.That could be considered as a vulnerability:
How to Reproduce
Steps to reproduce the behavior:
./css
http://localhost:3000/css../whatever
. The 500 error code is returned instead of the expected 404.Expected Behavior
The static router should always return 404 if the requested path does not exist.
A workaround is to explicitly exclude the buggy path:
Fiber Version
v2.52.5
Code Snippet (optional)
No response
Checklist:
The text was updated successfully, but these errors were encountered: