CVE-2021-3524: Input Validation
A flaw was found in the Red Hat Ceph Storage RadosGW (Ceph Object Gateway) in versions before 14.2.21. The vulnerability is related to the injection of HTTP headers via a CORS ExposeHeader tag. The newline character in the ExposeHeader tag in the CORS configuration file generates a header injection in the response when the CORS request is made. In addition, the prior bug fix for CVE-2020-10753 did not account for the use of \r as a header separator, thus a new flaw has been created.
Other sources
A flaw was found in the Red Hat Ceph Storage RadosGW (Ceph Object Gateway). The vulnerability is related to the injection of HTTP headers via a CORS ExposeHeader tag. The newline character in the ExposeHeader tag in the CORS configuration file generates a header injection in the response when making the CORS request. The highest threat from this vulnerability is to integrity.
It was reported that "newline" character in the CORS xml configuration file in the ExposeHeader tag can lead to the header injection attack. When the CORS request is made the response contain the injected header. Using newline characters injected into the HTTP headers, it is possible for the malicious user to add arbitrary headers such as Set-Cookie to set arbitrary cookies.
This impacts the RHCS RadosGW S3 API. For example malicious user could create a publicly-accessible S3 bucket with such CORS configuration and anyone that accessed that bucket would have these headers injected.
In addition, in contrast to the prior fix, \r can be used as a separator, and is not fixed in the prior patch, which only handled \n separators.
— Red Hat
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/cephto a version that resolves this vulnerability.Fixed in 2:14.2.22-110.el7c - Upgrade
Upgrade
redhat/cephto a version that resolves this vulnerability.Fixed in 2:16.2.7-98.el8c - Upgrade
Upgrade
redhat/cephto a version that resolves this vulnerability.Fixed in 14.2.21 - Upgrade
Upgrade
Red Hat Ceph Storage RadosGW (Ceph Object Gateway)to a version that resolves this vulnerability.Fixed in 14.2.21 - Configuration
Edit the CORS XML configuration file for the RadosGW S3 API so the ExposeHeader tag does not contain newline characters (both "\n" and "\r" can be used as separators, enabling header injection).
RHCS RadosGW S3 API CORS configuration (ExposeHeader tag) ExposeHeader tag newline characters = Remove any newline characters (e.g., "\n" and also "\r" separators) from the CORS XML ExposeHeader tag
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is CVE-2021-3524?
CVE-2021-3524 is a vulnerability found in the Red Hat Ceph Storage RadosGW (Ceph Object Gateway) before version 14.2.21.
How severe is CVE-2021-3524?
CVE-2021-3524 has a severity rating of 6.5 (medium).
What is the vulnerability in CVE-2021-3524 related to?
The vulnerability in CVE-2021-3524 is related to the injection of HTTP headers via a CORS ExposeHeader tag.
Which versions of Red Hat Ceph Storage RadosGW are affected by CVE-2021-3524?
Versions before 14.2.21 of Red Hat Ceph Storage RadosGW are affected by CVE-2021-3524.
How can I fix CVE-2021-3524?
To fix CVE-2021-3524, you should update your Red Hat Ceph Storage RadosGW to version 14.2.21 or later.