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

SSRF and file read with wkhtmltoimage #3570

Closed
filefox opened this Issue Jul 20, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@filefox
Copy link

filefox commented Jul 20, 2017

I found that if wkhtmltoimage convert a http status code 302 url,it may redirect to a local host and cut the image.

for example:

<?php
     header('location:http://127.0.0.1');
?>

put it on a outer website. wkhtmltoimage whill redirect to http://127.0.0.1 and get the image.
it will be a inner site sniffer.

it also can be a file read

<?php
     header('location:file:///tmp/1.txt');
?>

this url will redirect to a local file

i need set some options to fobidden redirect.

@ashkulz

This comment has been minimized.

Copy link
Member

ashkulz commented May 1, 2018

Try using --disable-local-file-access

@ashkulz ashkulz closed this May 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment