Skip to content

Instantly share code, notes, and snippets.

@th4s1s
Created January 6, 2025 08:56
Show Gist options
  • Select an option

  • Save th4s1s/03262c6ce877137b61d745a2e4fe8a63 to your computer and use it in GitHub Desktop.

Select an option

Save th4s1s/03262c6ce877137b61d745a2e4fe8a63 to your computer and use it in GitHub Desktop.

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

Project

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

Vulnerability

/subcat.php - $catnm paremeter.

Description

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

Path: /subcat.php?cat_nm=1&cat=1&catnm=<img/src/onerror=alert(1)>

<div id="page">
  <!-- start content -->
  <div id="content">
    <div class="post">
      <h1 class="title"><?php echo $_GET['catnm'];?></h1>
      <div class="entry">

PoC

image

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