| 제목 | SourceCodester Inventory System using PHP and MySQL 1.0 Cross Site Scripting |
|---|
| 설명 | Product: "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. |
|---|
| 사용자 | kingkingqc (UID 102826) |
|---|
| 제출 | 2026. 11. 08. AM 09:41 (22 날 ago) |
|---|
| 모더레이션 | 2026. 11. 29. PM 09:14 (21 days later) |
|---|
| 상태 | 중복 |
|---|
| VulDB 항목 | 374578 [SourceCodester Inventory Management System 1.0 User Registration Endpoint /api/users_handler.php full_name 크로스 사이트 스크립팅] |
|---|
| 포인트들 | 0 |
|---|