CVE-2021-22876: Infoleak
curl 7.1.1 to and including 7.75.0 is vulnerable to an "Exposure of Private Personal Information to an Unauthorized Actor" by leaking credentials in the HTTP Referer: header. libcurl does not strip off user credentials from the URL when automatically populating the Referer: HTTP request header field in outgoing HTTP requests, and therefore risks leaking sensitive data to the server that is the target of the second HTTP request.
Other sources
cURL libcurl could allow a remote attacker to obtain sensitive information, caused by the failure to strip off user credentials from the URL when automatically populating the Referer: HTTP request header field in outgoing HTTP requests. By sending a specially-crafted HTTP request, an attacker could exploit this vulnerability to obtain user credentials, and use this information to launch further attacks against the affected system.
— IBM
It was discovered that libcurl did not remove authentication credentials from URLs when automatically populating the Referer HTTP request header while handling HTTP redirects. This could lead to exposure of the credentials to the server to which requests were redirected.
libcurl does not strip off user credentials from the URL when automatically populating the Referer: HTTP request header field in outgoing HTTP requests, and therefore risks leaking sensitive data to the server that is the target of the second HTTP request.
Upstream Advisory:
https://curl.se/docs/CVE-2021-22876.html
— Red Hat
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/jbcs-httpd24to a version that resolves this vulnerability.Fixed in 0:1-18.el8 - Upgrade
Upgrade
redhat/jbcs-httpd24-aprto a version that resolves this vulnerability.Fixed in 0:1.6.3-105.el8 - Upgrade
Upgrade
redhat/jbcs-httpd24-apr-utilto a version that resolves this vulnerability.Fixed in 0:1.6.1-82.el8 - Upgrade
Upgrade
redhat/jbcs-httpd24-brotlito a version that resolves this vulnerability.Fixed in 0:1.0.6-40.el8 - Upgrade
Upgrade
redhat/jbcs-httpd24-curlto a version that resolves this vulnerability.Fixed in 0:7.77.0-2.el8 - Upgrade
Upgrade
redhat/jbcs-httpd24-httpdto a version that resolves this vulnerability.Fixed in 0:2.4.37-74.el8 - Upgrade
Upgrade
redhat/jbcs-httpd24-janssonto a version that resolves this vulnerability.Fixed in 0:2.11-55.el8 - Upgrade
Upgrade
redhat/jbcs-httpd24-nghttp2to a version that resolves this vulnerability.Fixed in 0:1.39.2-37.el8 - Upgrade
Upgrade
redhat/jbcs-httpd24-opensslto a version that resolves this vulnerability.Fixed in 1:1.1.1g-6.el8 - Upgrade
Upgrade
redhat/jbcs-httpd24-openssl-chilto a version that resolves this vulnerability.Fixed in 0:1.0.0-5.el8 - Upgrade
Upgrade
redhat/jbcs-httpd24-openssl-pkcs11to a version that resolves this vulnerability.Fixed in 0:0.4.10-20.el8 - Upgrade
Upgrade
redhat/jbcs-httpd24to a version that resolves this vulnerability.Fixed in 0:1-18.jbcs.el7 - Upgrade
Upgrade
redhat/jbcs-httpd24-aprto a version that resolves this vulnerability.Fixed in 0:1.6.3-105.jbcs.el7 - Upgrade
Upgrade
redhat/jbcs-httpd24-apr-utilto a version that resolves this vulnerability.Fixed in 0:1.6.1-82.jbcs.el7 - Upgrade
Upgrade
redhat/jbcs-httpd24-curlto a version that resolves this vulnerability.Fixed in 0:7.77.0-2.jbcs.el7 - Upgrade
Upgrade
redhat/jbcs-httpd24-httpdto a version that resolves this vulnerability.Fixed in 0:2.4.37-74.jbcs.el7 - Upgrade
Upgrade
redhat/jbcs-httpd24-janssonto a version that resolves this vulnerability.Fixed in 0:2.11-55.jbcs.el7 - Upgrade
Upgrade
redhat/rh-dotnet31-curlto a version that resolves this vulnerability.Fixed in 0:7.61.1-22.el7_9 - Upgrade
Upgrade
redhat/curlto a version that resolves this vulnerability.Fixed in 0:7.61.1-22.el8 - Upgrade
Upgrade
debian/curlto a version that resolves this vulnerability.Fixed in 7.64.0-4+deb10u2Fixed in 7.64.0-4+deb10u7Fixed in 7.74.0-1.3+deb11u9Fixed in 7.74.0-1.3+deb11u10Fixed in 7.88.1-10+deb12u3Fixed in 7.88.1-10+deb12u4Fixed in 8.4.0-2 - Upgrade
Upgrade
redhat/curlto a version that resolves this vulnerability.Fixed in 7.76.0 - Configuration
Do not enable automatic Referer generation when following redirects. Avoid curl -e ';auto' or --referer ';auto', and do not enable libcurl CURLOPT_AUTOREFERER.
curl command line tool / libcurl automatic Referer generation on redirects = disabled - Configuration
Do not include credentials in URLs such as https://username:password@example.com. For curl, use -u or --user; for libcurl, use CURLOPT_USERPWD or CURLOPT_USERNAME / CURLOPT_PASSWORD.
curl command line tool / libcurl authentication credential placement = credentials supplied through options, not URLs
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is the vulnerability ID of this vulnerability?
The vulnerability ID is CVE-2021-22876.
What is the severity of CVE-2021-22876?
The severity of CVE-2021-22876 is high with a severity value of 7.5.
How does CVE-2021-22876 affect libcurl?
CVE-2021-22876 affects libcurl by allowing a remote attacker to obtain sensitive information.
How can an attacker exploit CVE-2021-22876?
An attacker can exploit CVE-2021-22876 by sending a specially-crafted HTTP request.
Is there a fix available for CVE-2021-22876?
Yes, a fix is available for CVE-2021-22876. Please refer to the provided references for more information on how to obtain the fix.