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
So it is possible to inject URLs like: /mathjax/%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F../etc/passwd
or on heroku apps: /mathjax/%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F../apps/Gemfile
Suggested fix (please check the PR: #25) return render status: 404 if Pathname.new(filename).cleanpath.to_s != filename
Please consider that params[:uri] and params[:ext] could be subject to path traversal since both are included in the 'filename' variable.
If there is anything I can help you with, please feel free to ask.
Best regards,
Oliver Kuster
The text was updated successfully, but these errors were encountered:
Hi,
I've noticed that the function 'def giveOutStaticFile' does not properly sanitize the 'uri' variable:
So it is possible to inject URLs like:
/mathjax/%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F../etc/passwd
or on heroku apps:
/mathjax/%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F../apps/Gemfile
Suggested fix (please check the PR: #25)
return render status: 404 if Pathname.new(filename).cleanpath.to_s != filename
Please consider that params[:uri] and params[:ext] could be subject to path traversal since both are included in the 'filename' variable.
If there is anything I can help you with, please feel free to ask.
Best regards,
Oliver Kuster
The text was updated successfully, but these errors were encountered: