Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2025-43821 Overview
CVE-2025-43821 is a stored cross-site scripting (XSS) vulnerability [CWE-79] in the Commerce Product Comparison Table widget of Liferay Portal and Liferay Digital Experience Platform (DXP). An authenticated attacker with product-editing privileges can inject arbitrary JavaScript or HTML through a crafted payload submitted to a Commerce Product's Name text field. When the Comparison Table widget renders the product name on a storefront page, the payload executes in the browser of any user viewing the page.
Critical Impact
Successful exploitation allows execution of attacker-controlled script in the context of other users' sessions, which can lead to session theft, phishing redirects, and defacement of commerce storefronts.
Affected Products
- Liferay Portal 7.4.0 through 7.4.3.111
- Liferay DXP 2023.Q4.0 through 2023.Q4.5 and 2023.Q3.1 through 2023.Q3.8
- Liferay DXP 7.4 GA through update 92
Discovery Timeline
- 2025-10-08 - CVE-2025-43821 published to the National Vulnerability Database (NVD)
- 2026-10-18 - Last updated in the NVD database
Technical Details for CVE-2025-43821
Vulnerability Analysis
The flaw resides in how the Commerce Product Comparison Table widget renders product metadata on the client side. The widget outputs the product Name field into the response HTML without applying output encoding or sanitization sufficient to neutralize active content.
Because the injection vector is the product name, the payload is stored server-side and executes every time the comparison table loads. This makes the issue a persistent (stored) XSS rather than a reflected one.
Exploitation requires an authenticated session with permissions to create or edit Commerce Products, but any user with access to the storefront - including unauthenticated visitors - becomes a target when the widget renders. User interaction is required because the victim must load a page containing the widget.
Root Cause
The underlying weakness is improper neutralization of input during web page generation [CWE-79]. The product name is treated as trusted data when it is written to the DOM by the Comparison Table widget, bypassing the escaping applied in other product-rendering paths.
Attack Vector
An attacker with Commerce catalog write permissions submits a product record whose Name field contains an HTML or JavaScript payload. The payload is persisted in the product catalog. When a shopper or administrator opens a page that embeds the Commerce Product Comparison Table widget referencing that product, the browser parses and executes the injected content under the origin of the Liferay site.
See the Liferay Security Advisory CVE-2025-43821 for the vendor's technical description.
Detection Methods for CVE-2025-43821
Indicators of Compromise
- Commerce Product Name fields containing HTML tags such as <script>, <img onerror=...>, <svg onload=...>, or javascript: URIs.
- Unexpected outbound requests from browsers viewing storefront pages to attacker-controlled domains.
- Audit log entries showing product create or edit actions from accounts that do not normally manage catalog data.
Detection Strategies
- Query the Liferay database or Commerce admin API for product names containing angle brackets, event handler attributes, or encoded script delimiters.
- Inspect HTTP responses rendering the Comparison Table widget for script content that did not originate from the Liferay theme or site templates.
- Correlate catalog modification events with subsequent anomalous browser traffic from end-user sessions.
Monitoring Recommendations
- Enable and forward Liferay audit logs for Commerce catalog changes to a centralized logging platform.
- Monitor Content Security Policy (CSP) violation reports from the storefront for inline script execution attempts.
- Alert on administrative account activity that creates or modifies products outside normal change windows.
How to Mitigate CVE-2025-43821
Immediate Actions Required
- Upgrade Liferay Portal and Liferay DXP to a fixed release as identified in the Liferay Security Advisory CVE-2025-43821.
- Audit existing Commerce Product records for malicious markup in the Name field and sanitize or remove offending entries.
- Restrict Commerce catalog edit permissions to the minimum set of trusted accounts.
Patch Information
Liferay has published fixed versions and remediation guidance in the vendor advisory. Apply the vendor-supplied patches or upgrade to a release that supersedes Liferay Portal 7.4.3.111, DXP 2023.Q4.5, DXP 2023.Q3.8, or DXP 7.4 update 92 as applicable to your deployment.
Workarounds
- Deploy a Content Security Policy that disallows inline scripts and restricts script sources to trusted origins to limit payload execution.
- Remove the Commerce Product Comparison Table widget from public pages until the patch can be applied.
- Place a web application firewall (WAF) rule in front of the Commerce admin endpoints to block product payloads containing HTML or script tokens.
# Example WAF signature concept - block script-like payloads in product name parameters
SecRule ARGS_NAMES "@rx (?i)name" \
"chain,id:1004382,phase:2,deny,status:403,msg:'CVE-2025-43821 payload in product name'"
SecRule ARGS "@rx (?i)(<script|onerror=|onload=|javascript:)" "t:none,t:urlDecodeUni"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

