Miggo Logo

CVE-2025-43771: Liferay Portal Notifications Widget has multiple XSS vulnerabilities through various text fields

N/A

CVSS Score

Basic Information

EPSS Score
0.36234%
Published
10/8/2025
Updated
10/9/2025
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
-
Package NameEcosystemVulnerable VersionsFirst Patched Version
com.liferay:com.liferay.flags.webmaven>= 6.0.23, < 6.0.246.0.24

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability lies in several notification handler classes within Liferay Portal. The core of the issue is the use of unescaped data when constructing notification messages. The patches consistently show a shift from retrieving an originalValue to an escapedValue from the JSON data that makes up the notification content.

The analysis of the provided commits reveals the following:

  1. com.liferay.flags.web.internal.notifications.FlagsUserNotificationHandler: Both the getBody and getLink methods were vulnerable. They were using a helper method _getOriginalValue which, as the name implies and the patch confirms, was fetching raw, unescaped data. This data, originating from user-provided fields like names or flagged content reasons, could contain malicious scripts. The fix involved renaming _getOriginalValue to _getEscapedValue and ensuring it fetches pre-escaped data from the JSON payload.

  2. com.liferay.asset.publisher.web.internal.notifications.AssetPublisherUserNotificationHandler: The getBodyContent method in this class was also found to be vulnerable. Similar to the previous case, it was retrieving the originalValue from a JSON object, which was then rendered without proper escaping. The fix was to switch to using the escapedValue.

The test file changes in commit 28dc724658e13acb80f30fb3211d0849592ec4ef further confirm the nature of the vulnerability by adding specific test cases for XSS payloads in user names and other content, ensuring they are properly escaped in the final output.

An engineer seeing this CVE in their environment should understand that any user-generated content that can trigger a notification via the Flags or Asset Publisher widgets could be a vector for this XSS attack. The identified functions are the points where this malicious input is processed and rendered, making them the key indicators of exploitation in a runtime profile.

Vulnerable functions

com.liferay.flags.web.internal.notifications.FlagsUserNotificationHandler.getBody
modules/apps/flags/flags-web/src/main/java/com/liferay/flags/web/internal/notifications/FlagsUserNotificationHandler.java
The `getBody` method was vulnerable to XSS because it used the `_getOriginalValue` method, which retrieved unescaped data from the JSON payload. This unescaped data, which could include user names and other content, was then used to construct the notification body, allowing for the injection of malicious scripts.
com.liferay.flags.web.internal.notifications.FlagsUserNotificationHandler.getLink
modules/apps/flags/flags-web/src/main/java/com/liferay/flags/web/internal/notifications/FlagsUserNotificationHandler.java
The `getLink` method was vulnerable because it used the `_getOriginalValue` method to retrieve the content URL from the JSON payload. If a malicious URL containing script was provided, it would be rendered unescaped, leading to an XSS vulnerability.
com.liferay.asset.publisher.web.internal.notifications.AssetPublisherUserNotificationHandler.getBodyContent
modules/apps/asset/asset-publisher-web/src/main/java/com/liferay/asset/publisher/web/internal/notifications/AssetPublisherUserNotificationHandler.java
The `getBodyContent` method was vulnerable to XSS because it directly returned the `originalValue` from the JSON object, which was not sanitized. This allowed for the injection of arbitrary HTML and script into the notification content.

WAF Protection Rules

WAF Rule

Multipl* *ross-sit* s*riptin* (XSS) vuln*r**iliti*s in t** Noti*i**tions wi***t in Li**r*y Port*l *.*.*.*** t*rou** *.*.*.***, *n* Li**r*y *XP ****.Q*.* t*rou** ****.Q*.* *n* ****.Q*.* t*rou** ****.Q*.** *llow r*mot* *tt**k*rs to inj**t *r*itr*ry w**

Reasoning

T** vuln*r**ility li*s in s*v*r*l noti*i**tion **n*l*r *l*ss*s wit*in Li**r*y Port*l. T** *or* o* t** issu* is t** us* o* un*s**p** **t* w**n *onstru*tin* noti*i**tion m*ss***s. T** p*t***s *onsist*ntly s*ow * s*i*t *rom r*tri*vin* *n `ori*in*lV*lu*`