CVE-2025-43755
Description
A Stored cross-site scripting vulnerability in the Liferay Portal 7.4.0 t through 7.4.3.132, and Liferay DXP 2025.Q2.0, 2025.Q1.0 through 2025.Q1.13, 2024.Q4.0 through 2024.Q4.7, 2024.Q3.0 through 2024.Q3.13, 2024.Q2.0 through 2024.Q2.13, 2024.Q1.1 through 2024.Q1.17 and 7.4 GA through update 92 allows an remote authenticated attacker to inject JavaScript into the _com_liferay_layout_admin_web_portlet_GroupPagesPortlet_type parameter.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
com.liferay:com.liferay.layout.admin.webMaven | < 5.0.191 | 5.0.191 |
Affected products
2- Liferay/DXPv5Range: 7.4.13
Patches
2f91c374d28c4LPD-54782 Playwright test to reproduce the issue
1 file changed · +41 −0
modules/test/playwright/tests/layout-admin-web/main/pageConfiguration.spec.ts+41 −0 modified@@ -213,6 +213,47 @@ test.describe('General configuration', () => { ).toBeVisible(); } ); + + test( + 'Layout type is escaped', + { + tag: '@LPD-54782', + }, + async ({ + apiHelpers, + page, + pageConfigurationPage, + pagesAdminPage, + site, + }) => { + + // Create a layout + + const title = getRandomString(); + + await apiHelpers.jsonWebServicesLayout.addLayout({ + groupId: site.id, + options: { + type: 'contenttho8o<script>alert(12345)</script>l421oja33oz', + }, + title, + }); + + // Go to page configuration + + await pagesAdminPage.goto(site.friendlyUrlPath); + + await pageConfigurationPage.goToSection(title, 'General'); + + // Verify no alert is shown + + page.on('dialog', async (dialog) => { + await dialog.accept(); + + expect(dialog.message(), '12345').toBeNull(); + }); + } + ); }); test.describe('Design configuration', () => {
5db1ab018d71LPD-54782 Escape layout type when shown in messages
2 files changed · +4 −4
modules/apps/layout/layout-admin-web/src/main/resources/META-INF/resources/layout/screen/navigation/entries/general.jsp+3 −3 modified@@ -128,19 +128,19 @@ portletDisplay.setURLBackTitle(ParamUtil.getString(request, "backURLTitle")); %> <c:if test="<%= lte.getType() == LayoutTypeException.FIRST_LAYOUT %>"> - <liferay-ui:message arguments='<%= Validator.isNull(lte.getLayoutType()) ? type : "layout.types." + lte.getLayoutType() %>' key="the-first-page-cannot-be-of-type-x" /> + <liferay-ui:message arguments='<%= Validator.isNull(lte.getLayoutType()) ? HtmlUtil.escape(type) : "layout.types." + HtmlUtil.escape(lte.getLayoutType()) %>' key="the-first-page-cannot-be-of-type-x" /> </c:if> <c:if test="<%= lte.getType() == LayoutTypeException.FIRST_LAYOUT_PERMISSION %>"> <liferay-ui:message key="you-cannot-delete-this-page-because-the-next-page-is-not-viewable-by-unauthenticated-users-and-so-cannot-be-the-first-page" /> </c:if> <c:if test="<%= lte.getType() == LayoutTypeException.NOT_INSTANCEABLE %>"> - <liferay-ui:message arguments="<%= type %>" key="pages-of-type-x-cannot-be-selected" /> + <liferay-ui:message arguments="<%= HtmlUtil.escape(type) %>" key="pages-of-type-x-cannot-be-selected" /> </c:if> <c:if test="<%= lte.getType() == LayoutTypeException.NOT_PARENTABLE %>"> - <liferay-ui:message arguments="<%= type %>" key="pages-of-type-x-cannot-have-child-pages" /> + <liferay-ui:message arguments="<%= HtmlUtil.escape(type) %>" key="pages-of-type-x-cannot-have-child-pages" /> </c:if> </liferay-ui:error>
modules/apps/layout/layout-admin-web/src/main/resources/META-INF/resources/layout_type_resources.jsp+1 −1 modified@@ -81,7 +81,7 @@ if (selLayout != null) { <div class="layout-type"> <p class="small text-secondary"> - <liferay-ui:message key='<%= "layout.types." + type + ".description" %>' /> + <liferay-ui:message key='<%= "layout.types." + HtmlUtil.escape(type) + ".description" %>' /> </p> <%= layoutTypeController.includeEditContent(request, response, selLayout) %>
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
6- github.com/advisories/GHSA-58cq-8wm2-6m87ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2025-43755ghsaADVISORY
- github.com/liferay/liferay-portal/commit/5db1ab018d71689fc1eaebcbd27c202e9c2b44d9ghsaWEB
- github.com/liferay/liferay-portal/commit/f91c374d28c478db38006f5c2d1802c2ab55d034ghsaWEB
- liferay.atlassian.net/browse/LPE-18238ghsaWEB
- liferay.dev/portal/security/known-vulnerabilities/-/asset_publisher/jekt/content/CVE-2025-43755ghsaWEB
News mentions
0No linked articles in our index yet.