| 标题 | 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 09時14分 (22 日前) |
|---|
| 管理 | 2026-11-29 20時49分 (21 days later) |
|---|
| 状态 | 已接受 |
|---|
| VulDB条目 | 445252 [SourceCodester Real Estate Property Listing App 1.0 /index.php property['title'] 跨网站脚本] |
|---|
| 积分 | 17 |
|---|