CVE-2025-43746: Liferay Portal Vulnerable to Cross-Site Scripting in Dynamic Data Mapping
N/A
Basic Information
Technical Details
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| com.liferay.portal:release.portal.bom | maven | >= 7.4.0-ga1, <= 7.4.3.132-ga132 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability is a reflected cross-site scripting (XSS) issue within the Dynamic Data Mapping module of Liferay Portal. The root cause is the failure to properly sanitize the portletNamespace and namespace request parameters before they are used in the rendered HTML output.
The analysis of the provided commits pinpoints the exact location of the vulnerability and the subsequent fix. Commit 5ca8331da4503ae336818a747e43817066f27b73 clearly shows the addition of HtmlUtil.escapeAttribute to sanitize these parameters within the createDDMFormFieldRenderingContext method of the RenderStructureFieldMVCResourceCommand.java file. This method is responsible for preparing the data that will be used for rendering.
The doServeResource method in the same class is the main handler for the resource request. It calls createDDMFormFieldRenderingContext to get the rendering context and then proceeds to render the HTML, which includes the tainted data. Therefore, doServeResource is the entry point for the exploitation of this vulnerability, and createDDMFormFieldRenderingContext is where the vulnerable data is processed.
An attacker could exploit this by crafting a URL with malicious JavaScript in the _com_liferay_dynamic_data_mapping_web_portlet_DDMPortlet_portletNamespace or _com_liferay_dynamic_data_mapping_web_portlet_DDMPortlet_namespace parameters. When a user clicks this link, the script would execute in their browser in the context of the Liferay Portal domain. Both identified functions would be present in the execution stack during such an attack.