Discover how CVE-2021-29479 affects Ratpack web applications. Learn about the impact, technical details, and mitigation steps to prevent cached redirect poisoning.
Ratpack is a toolkit for creating web applications. In versions prior to 1.9.0, a user-supplied
X-Forwarded-Host
header can be exploited to perform cache poisoning affecting a Ratpack server. Learn more about the impact, technical details, and mitigation strategies below.
Understanding CVE-2021-29479
This CVE describes a vulnerability in Ratpack versions before 1.9.0 that allows for cached redirect poisoning using the
X-Forwarded-Host
header.
What is CVE-2021-29479?
In versions prior to 1.9.0, the use of a user-supplied
X-Forwarded-Host
header can lead to cache poisoning if the cache key does not include the X-Forwarded-Host
header as a cache key.
The Impact of CVE-2021-29479
The vulnerability can be exploited to perform redirect cache poisoning, enabling an attacker to redirect cached redirects to their site instead of the intended location. This poses a high integrity impact and a high severity threat.
Technical Details of CVE-2021-29479
Here are the technical details related to this CVE:
Vulnerability Description
Ratpack versions prior to 1.9.0 are susceptible to cache poisoning through the
X-Forwarded-Host
header, impacting the proper redirection of cached requests.
Affected Systems and Versions
The vulnerability affects Ratpack versions lower than 1.9.0.
Exploitation Mechanism
By manipulating the
X-Forwarded-Host
header, malicious actors can poison the cache system, redirecting cached requests to unauthorized sites.
Mitigation and Prevention
To address CVE-2021-29479 and enhance security, consider the following measures:
Immediate Steps to Take
Ensure that
ServerConfigBuilder::publicAddress
is correctly configured in the production environment to prevent cache poisoning attacks.
Long-Term Security Practices
Regularly update to the latest version of Ratpack and monitor security advisories for any upcoming vulnerabilities.
Patching and Updates
It is crucial to apply the patch provided in Ratpack 1.9.0 to mitigate the risk of cached redirect poisoning.