CVE-2025-43781 Liferay Portal is vulnerable to XSS attack through its search bar portlet

Medium 5.3 Published Updated

Remote attackers can inject arbitrary web script or HTML via the search bar portlet URL in Liferay Portal and DXP.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2025-43781?

CVE-2025-43781 is a medium-severity cross-site scripting vulnerability in Liferay Digital Experience Platform, published on 9 Sep 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

Reflected cross-site scripting (XSS) vulnerability in Liferay Portal 7.4.3.110 through 7.4.3.128, and Liferay DXP 2024.Q3.1 through 2024.Q3.8, 2024.Q2.0 through 2024.Q2.13 and 2024.Q1.1 through 2024.Q1.12 allows remote attackers to inject arbitrary web script or HTML via the URL in search bar portlet

Weakness: CWE-79

Which versions are affected by CVE-2025-43781?

2 open source packages ship an affected version, including com.liferay:com.liferay.portal.search.web. It affects 2 products.

PackageAffectedFixed in
com.liferay:com.liferay.portal.search.web MavenFrom 6.0.1256.0.143
com.liferay:com.liferay.portal.search.web MavenFrom 6.0.1256.0.143

Products include Liferay Digital Experience Platform, Liferay Liferay Portal.

How do I fix CVE-2025-43781?

Upgrade com.liferay:com.liferay.portal.search.web to 6.0.143 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2025-43781 being exploited?

There is no known exploitation of CVE-2025-43781 in the wild and no public exploit code.

All Liferay Digital Experience Platform vulnerabilities

Sources

Also known as GHSA-x5fw-8xgx-q6c9.

Is CVE-2025-43781 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free