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

Potential SSRF vulnerability via coverurl #16

Open
mal-tee opened this issue Jan 31, 2024 · 1 comment
Open

Potential SSRF vulnerability via coverurl #16

mal-tee opened this issue Jan 31, 2024 · 1 comment

Comments

@mal-tee
Copy link

mal-tee commented Jan 31, 2024

Hi,

php-epub-meta/index.php

Lines 59 to 60 in 4fc37ad

if(preg_match('/^https?:\/\//i',$_POST['coverurl'])){
$data = @file_get_contents($_POST['coverurl']);

allows an attacker to trigger a HTTP(S)-request to an arbitrary target via file_get_contents. This includes things like localhost. This is a vulnerability called Server-Side Request Forgery (SSRF).

SSRF can be used to exploit the local system, gain privileges and much more, depending on the deployment. Check out e.g. OWASP' material on SSRF for more information: https://owasp.org/Top10/A10_2021-Server-Side_Request_Forgery_%28SSRF%29/

@splitbrain
Copy link
Owner

The index.php is a very simple example application using the library. It doesn't have any user authentication and is meant for personal use only. Anyone running this unprotected on the internet has bigger problems than the ability of requesting data from other servers in the same network.

Feel free to submit a pull request that fixes this without crippling the functionality. To me this is low priority at best.

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