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

Vulnerable to cross-site-scripting (XSS) in PHP_SELF #1

Open
JaneX8 opened this issue Mar 29, 2021 · 0 comments
Open

Vulnerable to cross-site-scripting (XSS) in PHP_SELF #1

JaneX8 opened this issue Mar 29, 2021 · 0 comments

Comments

@JaneX8
Copy link

JaneX8 commented Mar 29, 2021

At least the following two lines are vulnerable to cross-site-scripting (XSS):

  • <form name="thumbnail" action="<?php echo $_SERVER["PHP_SELF"];?>?ctrl=imguploadcrop&tipo=<?php echo $tipo_conteudo; ?>&upload_key=<?php echo $upload_key; ?>&tw=<?php echo $thumb_width; ?>&th=<?php echo $thumb_height; ?>" method="post">
  • <form name="photo" enctype="multipart/form-data" action="<?php echo $_SERVER["PHP_SELF"];?>?ctrl=imguploadcrop&tipo=<?php echo $tipo_conteudo; ?>&upload_key=<?php echo $upload_key; ?>&tw=<?php echo $thumb_width; ?>&th=<?php echo $thumb_height; ?>" method="post">

For example by visiting the page with URL path /'"/><script>alert(1)</script> the $_SERVER["PHP_SELF"] value will print the URL path unfiltered and allow cross-site-scripting (XSS).

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

1 participant