CVE-2023-37940

4.8 MEDIUM

📋 TL;DR

This is a cross-site scripting (XSS) vulnerability in Liferay Portal and DXP that allows attackers to inject malicious scripts into the Service Access Policy configuration page. When exploited, it enables attackers to execute arbitrary JavaScript in the context of authenticated users' browsers. This affects administrators and users with access to the service access policy configuration interface.

💻 Affected Systems

Products:
  • Liferay Portal
  • Liferay DXP
Versions: Liferay Portal 7.0.0 through 7.4.3.87; Liferay DXP 7.4 GA through update 87, 7.3 GA through update 29, and older unsupported versions
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Requires access to the Service Access Policy configuration interface, typically limited to administrators or users with specific permissions.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

An attacker could steal administrator session cookies, perform actions as authenticated users, redirect to malicious sites, or compromise user accounts through stored XSS.

🟠

Likely Case

Attackers inject malicious scripts that steal session tokens or credentials from authenticated users accessing the affected configuration page.

🟢

If Mitigated

With proper input validation and output encoding, the payload would be rendered harmless as text rather than executable code.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires authenticated access to the vulnerable configuration page. The vulnerability is in the 'Service Class' text field of the edit Service Access Policy page.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Liferay Portal 7.4.3.88+, Liferay DXP 7.4 update 88+, 7.3 update 30+

Vendor Advisory: https://liferay.dev/portal/security/known-vulnerabilities/-/asset_publisher/jekt/content/CVE-2023-37940

Restart Required: Yes

Instructions:

1. Download the appropriate patch from Liferay's customer portal. 2. Apply the patch according to Liferay's patching documentation. 3. Restart the Liferay instance. 4. Verify the fix by checking the version.

🔧 Temporary Workarounds

Input Validation Filter

all

Implement a servlet filter or input validation to sanitize the 'Service Class' field input before processing.

Access Restriction

all

Restrict access to the Service Access Policy configuration page to only essential administrators.

🧯 If You Can't Patch

  • Implement web application firewall (WAF) rules to block XSS payloads targeting the service access policy endpoints.
  • Enable Content Security Policy (CSP) headers to mitigate the impact of successful XSS exploitation.

🔍 How to Verify

Check if Vulnerable:

Check your Liferay version against affected versions. If using affected versions and the Service Access Policy feature is enabled, you are vulnerable.

Check Version:

Check the Liferay Control Panel → Server Administration → Properties → liferay.version property, or examine the liferay-portal.xml file.

Verify Fix Applied:

After patching, verify the version is 7.4.3.88+ for Portal or update 88+ for DXP 7.4, or update 30+ for DXP 7.3. Test the Service Class field with basic XSS payloads to ensure they are properly sanitized.

📡 Detection & Monitoring

Log Indicators:

  • Unusual POST requests to /group/control_panel/manage?p_p_id=com_liferay_portal_security_service_access_policy_web_internal_portlet_ServiceAccessPolicyPortlet with script-like payloads in parameters

Network Indicators:

  • HTTP requests containing JavaScript or HTML injection patterns in the 'serviceClassName' parameter

SIEM Query:

web.url:"*ServiceAccessPolicyPortlet*" AND (http.method:POST AND web.query:"*<script*" OR web.query:"*javascript:*")

🔗 References

📤 Share & Export