Skip to content

Instantly share code, notes, and snippets.

@th4s1s
Last active January 6, 2025 01:09
Show Gist options
  • Select an option

  • Save th4s1s/19d21e7fdbaf3512fccfd75df3080657 to your computer and use it in GitHub Desktop.

Select an option

Save th4s1s/19d21e7fdbaf3512fccfd75df3080657 to your computer and use it in GitHub Desktop.

Online Book Shop Using PHP has Cross-Site Scripting (XSS) vulnerability via $subcatnm paremeter in /booklist.php.

Project

https://code-projects.org/online-book-shop-using-php-source-code/

Vulnerability

/booklist.php - $subcatnm paremeter.

Description

In the /booklist.php file, an unrestricted Cross-Site Scripting (XSS) vulnerability and injection attacks exist, specifically targeting the $subcatnm paremeter. The function echo the user-supplied parameter without validation. Malicious attackers can leverage this vulnerability to access sensitive client information.

Path: /booklist.php?subcatid=1&subcatnm=<img/src/onerror=alert(1)>

<div id="content">
  <div class="post">
    <h1 class="title"><?php echo $_GET['subcatnm'];?></h1>
    <div class="entry">

PoC

image

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