| Título | SourceCodester Real Estate Property Listing App 1.0 Cross Site Scripting |
|---|
| Descrição | Product: Real Estate Property Listing App v1.0 (SourceCodester project ID 18526, published 2025-11-27). https://www.sourcecodester.com/php/18526/real-estate-property-listing-app-using-php-and-mysql-source-code.html
Stored Cross-Site Scripting (CWE-79) triggered on the PUBLIC, unauthenticated homepage. The admin property form stores the property title unsanitized; the public frontend index.php renders it MULTIPLE times - line 78 correctly uses htmlspecialchars, but line 75 (alt="...") and line 74 (data-type="...") output the raw value, allowing attribute breakout with a double quote.
Attack: an administrator-level actor (or anyone using the factory credentials - see related submissions) creates a property with title: "><img src=x onerror=alert(document.domain)> — every UNAUTHENTICATED visitor of the homepage then executes the payload in their browser (session/credential theft, phishing, drive-by exploitation of visitors).
Verified on a local deployment:
1) POST property with the payload title -> accepted
2) GET /index.php (no cookies) -> response HTML contains: alt="""><img src=x onerror=alert(document.domain)>" — the raw onerror handler is present in the served HTML (verified via grep on the public response).
Suggested fix: apply htmlspecialchars($property['title'], ENT_QUOTES) on ALL output contexts (lines 74/75), not only line 78.
References: sourcecodester.com ID 18526. No prior advisory for this product (checked NVD/Exploit-DB/VulDB). |
|---|
| Utilizador | kingkingqc (UID 102826) |
|---|
| Submissão | 08/11/2026 09h14 (há 22 dias) |
|---|
| Moderação | 29/11/2026 20h49 (21 days later) |
|---|
| Estado | Aceite |
|---|
| Entrada VulDB | 445252 [SourceCodester Real Estate Property Listing App 1.0 /index.php property['title'] Script de Site Cruzado] |
|---|
| Pontos | 17 |
|---|