Skip to main content
Vulnerability Database/CVE-2024-25608

CVE-2024-25608: Liferay DXP CSRF Redirect Vulnerability

CVE-2024-25608 is a cross-site request forgery vulnerability in Liferay Digital Experience Platform allowing attackers to redirect users to malicious URLs. This article covers technical details, affected versions, and mitigation.

Published:

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-2024-25608 Overview

CVE-2024-25608 is an open redirect vulnerability [CWE-601] in the HtmlUtil.escapeRedirect method of Liferay Portal and Liferay Digital Experience Platform (DXP). Attackers can bypass the redirect sanitization logic by inserting the Unicode REPLACEMENT CHARACTER (U+FFFD) into URL parameters. Successful exploitation redirects authenticated or anonymous users from a trusted Liferay domain to attacker-controlled external destinations. The flaw affects multiple URL parameters including redirect, FORWARD_URL, and noSuchEntryRedirect, as well as any other parameter that depends on HtmlUtil.escapeRedirect for validation. Liferay published vendor advisory details on their known vulnerabilities portal.

Critical Impact

Remote unauthenticated attackers can craft Liferay URLs that redirect victims to arbitrary external sites, enabling phishing, credential theft, and malware delivery campaigns that appear to originate from a trusted Liferay portal.

Affected Products

  • Liferay Portal 7.2.0 through 7.4.3.18 (and older unsupported versions)
  • Liferay DXP 7.4 before update 19, 7.3 before update 4, 7.2 before fix pack 19
  • Older unsupported Liferay DXP versions

Discovery Timeline

  • 2024-02-20 - CVE-2024-25608 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-25608

Vulnerability Analysis

The vulnerability resides in HtmlUtil.escapeRedirect, a utility method Liferay uses to sanitize redirect targets supplied through HTTP parameters. The method is intended to block navigation to arbitrary external hosts, keeping redirects scoped to the Liferay portal. Attackers bypass this control by embedding the Unicode REPLACEMENT CHARACTER (U+FFFD) inside the target URL. The parser fails to reject or correctly normalize the character, causing the escape routine to treat an attacker-controlled host as a safe relative path. The browser subsequently resolves the response as an external redirect. Because the flaw is reachable through widely-used request parameters such as redirect, FORWARD_URL, and noSuchEntryRedirect, the attack surface spans most Liferay content and navigation endpoints. The vulnerability requires user interaction, since the victim must click or load the crafted Liferay link.

Root Cause

The root cause is improper input validation of URL strings containing the U+FFFD replacement character. HtmlUtil.escapeRedirect does not normalize or strip the character before performing its allowlist check, so a malformed host component evades parsing while remaining valid to the HTTP client that ultimately processes the redirect header.

Attack Vector

An attacker crafts a URL pointing to a legitimate Liferay instance and appends a vulnerable parameter such as ?redirect= containing a payload that uses the U+FFFD character to disguise an external host. The victim clicks the link, authenticates or browses the Liferay portal as normal, and the server responds with an HTTP redirect to the attacker-controlled destination. The payload is a URL manipulation and does not require source code to demonstrate; see the Liferay advisory for parameter-level detail.

Detection Methods for CVE-2024-25608

Indicators of Compromise

  • HTTP requests to Liferay endpoints containing the Unicode byte sequence %EF%BF%BD (U+FFFD) inside redirect, FORWARD_URL, or noSuchEntryRedirect parameters.
  • Server-side 302 responses whose Location header points to a host outside the configured Liferay domain allowlist.
  • Spikes in outbound navigation from Liferay URLs to newly-registered or typosquatted domains referenced in phishing campaigns.

Detection Strategies

  • Deploy web application firewall (WAF) rules that decode and inspect redirect-related parameters for non-printable or malformed Unicode code points before they reach the application.
  • Correlate web proxy logs with Liferay access logs to identify outbound redirects whose destination hostnames do not match the organization's approved portal domains.
  • Review phishing and user-reported URL submissions for Liferay hostnames combined with suspicious redirect query strings.

Monitoring Recommendations

  • Enable verbose access logging on Liferay reverse proxies to capture full query strings for post-incident analysis.
  • Alert on anomalous referral patterns where internal Liferay pages redirect users to uncategorized external domains.
  • Track EPSS and vendor advisory updates for CVE-2024-25608 to prioritize patch windows against observed exploit probability.

How to Mitigate CVE-2024-25608

Immediate Actions Required

  • Upgrade Liferay DXP to 7.4 update 19, 7.3 update 4, or 7.2 fix pack 19 as applicable.
  • Upgrade Liferay Portal to a version later than 7.4.3.18 that incorporates the HtmlUtil.escapeRedirect fix.
  • Audit custom modules and themes for direct use of HtmlUtil.escapeRedirect and validate they inherit the patched behavior.

Patch Information

Liferay has released fixed builds documented in the vendor advisory for CVE-2024-25608. Patched builds normalize the U+FFFD replacement character prior to redirect allowlist validation, closing the bypass.

Workarounds

  • Configure the upstream WAF or reverse proxy to reject requests whose redirect, FORWARD_URL, or noSuchEntryRedirect parameters contain the byte sequence %EF%BF%BD or raw U+FFFD.
  • Restrict allowed redirect destinations through Liferay's redirect.url.security.mode and redirect.url.domains.allowed properties to an explicit domain allowlist.
  • Educate users to inspect final destination URLs before submitting credentials when following links that originate from Liferay portals.
bash
# portal-ext.properties - restrict redirects to an explicit domain allowlist
redirect.url.security.mode=domain
redirect.url.domains.allowed=example.com,portal.example.com
redirect.url.ips.allowed=127.0.0.1,SERVER_IP

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

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.