CVE-2025-62246
Description
Multiple stored cross-site scripting (XSS) vulnerabilities in Liferay Portal 7.4.0 through 7.4.3.111, and older unsupported versions, and Liferay DXP 2023.Q4.0 through 2023.Q4.5, 2023.Q3.1 through 2023.Q3.8, 7.4 GA through update 92, and older unsupported versions allow remote authenticated users to inject arbitrary web script or HTML via a crafted payload injected into a user’s first, middle or last name text field to (1) page comments widget, (2) blog entry comments, (3) document and media document comments, (4) message board messages, (5) wiki page comments or (6) other widgets/apps that supports mentions.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
com.liferay:com.liferay.mentions.webMaven | < 6.0.35 | 6.0.35 |
Affected products
2- Liferay/DXPv5Range: 7.4.13
Patches
14218ecd902dbLPD-16323 Escape template values
1 file changed · +6 −5
modules/apps/mentions/mentions-web/src/main/java/com/liferay/mentions/web/internal/portlet/MentionsPortlet.java+6 −5 modified@@ -30,6 +30,7 @@ import com.liferay.portal.kernel.servlet.ServletResponseUtil; import com.liferay.portal.kernel.theme.ThemeDisplay; import com.liferay.portal.kernel.util.ContentTypes; +import com.liferay.portal.kernel.util.HtmlUtil; import com.liferay.portal.kernel.util.ParamUtil; import com.liferay.portal.kernel.util.Portal; import com.liferay.portal.kernel.util.Validator; @@ -134,27 +135,27 @@ private JSONArray _getJSONArray( continue; } - String mention = "@" + user.getScreenName(); + String mention = "@" + HtmlUtil.escape(user.getScreenName()); String profileURL = user.getDisplayURL(themeDisplay); if (Validator.isNotNull(profileURL)) { mention = StringBundler.concat( - "<a href=\"", profileURL, "\">@", user.getScreenName(), - "</a>"); + "<a href=\"", profileURL, "\">@", + HtmlUtil.escape(user.getScreenName()), "</a>"); } jsonArray.put( JSONUtil.put( - "fullName", user.getFullName() + "fullName", HtmlUtil.escape(user.getFullName()) ).put( "mention", mention ).put( "portraitHTML", UserPortraitTag.getUserPortraitHTML( StringPool.BLANK, user, themeDisplay) ).put( - "screenName", user.getScreenName() + "screenName", HtmlUtil.escape(user.getScreenName()) )); }
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- github.com/advisories/GHSA-mj68-2xr5-28xhghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2025-62246ghsaADVISORY
- github.com/liferay/liferay-portal/commit/4218ecd902dbd860d3f9ee233b0ffa4c822a49eeghsaWEB
- liferay.atlassian.net/browse/LPE-17940ghsaWEB
- liferay.dev/portal/security/known-vulnerabilities/-/asset_publisher/jekt/content/CVE-2025-62246ghsaWEB
News mentions
0No linked articles in our index yet.