Enviar #1081203: SourceCodester Inventory System using PHP and MySQL 1.0 Cross Site Scriptinginformación

TítuloSourceCodester Inventory System using PHP and MySQL 1.0 Cross Site Scripting
DescripciónProduct: "Inventory System using PHP and MySQL" (aka InventoryX) v1.0, SourceCodester project ID 18722 by ganeshrkt2019 (2026-05-23). https://www.sourcecodester.com/php/18722/php-inventory-system.html (Same-name old products on VulDB are different codebases; this targets project 18722 only.) UNAUTHENTICATED Stored Cross-Site Scripting (CWE-79) hitting the most sensitive admin page. The unauthenticated registration API (api/users_handler.php:54, same ungated action=register as the privilege-escalation issue) stores full_name without any filtering. The value is rendered RAW on users.php (lines 31-33: echo $row['full_name'] / $row['username'], no htmlspecialchars) - and users.php is the User Management page protected by requireAdminVerification() (admin role + password re-verification), meaning the stored payload fires precisely inside the administrator's most privileged context: session/credential theft from the page that manages all accounts. Verified end-to-end locally: 1) Unauthenticated: curl -X POST .../api/users_handler.php with action=register&username=xsstest&full_name=<img src=x onerror=alert(document.cookie)>&role=staff -> success, stored verbatim. 2) Administrator logs in, passes admin_verify.php (password re-check), opens users.php -> HTTP 200, 18926 bytes; page contains the RAW payload: <img src=x onerror=alert(document.cookie)> (verified by grep on the served HTML). Impact: an anonymous visitor plants JavaScript that executes for the (re-verified) administrator on the user-management page - account takeover of the admin session. Suggested fix: htmlspecialchars(..., ENT_QUOTES) on all users.php output; validate/sanitize full_name at the API. References: https://www.sourcecodester.com/php/18722/php-inventory-system.html - no prior advisory for this product.
Usuario
 kingkingqc (UID 102826)
Sumisión2026-11-08 09:41 (hace 22 días)
Moderación2026-11-29 21:14 (21 days later)
EstadoDuplicado
Entrada de VulDB374578 [SourceCodester Inventory Management System 1.0 User Registration Endpoint /api/users_handler.php full_name secuencias de comandos en sitios cruzados]
Puntos0

Do you know our Splunk app?

Download it now for free!