Skip to content

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

@JaneX8

Description

@JaneX8

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions