| 제목 | SourceCodester Real Estate Property Listing App 1.0 Cross Site Scripting |
|---|
| 설명 | 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). |
|---|
| 사용자 | kingkingqc (UID 102826) |
|---|
| 제출 | 2026. 11. 08. AM 09:14 (22 날 ago) |
|---|
| 모더레이션 | 2026. 11. 29. PM 08:49 (21 days later) |
|---|
| 상태 | 수락 |
|---|
| VulDB 항목 | 445252 [SourceCodester Real Estate Property Listing App 1.0 /index.php property['title'] 크로스 사이트 스크립팅] |
|---|
| 포인트들 | 17 |
|---|