CVE-2021-22922: Input Validation
A flaw was found in curl in the way curl handles a file hash mismatch after downloading content using the Metalink feature. This flaw allows malicious actors controlling a hosting server to trick users into downloading malicious content. The highest threat from this vulnerability is to integrity.
Other sources
When curl is instructed to download content using the metalink feature, the contents is verified against a hash provided in the metalink XML file. There's a risk the user doesn't notice the message and instead assumes the file is fine.
— Red Hat
When curl is instructed to download content using the metalink feature, thecontents is verified against a hash provided in the metalink XML file.The metalink XML file points out to the client how to get the same contentfrom a set of different URLs, potentially hosted by different servers and theclient can then download the file from one or several of them. In a serial orparallel manner.If one of the servers hosting the contents has been breached and the contentsof the specific file on that server is replaced with a modified payload, curlshould detect this when the hash of the file mismatches after a completeddownload. It should remove the contents and instead try getting the contentsfrom another URL. This is not done, and instead such a hash mismatch is onlymentioned in text and the potentially malicious content is kept in the file ondisk.
Affected Software
Remediation
Patch Available
Information
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is CVE-2021-22922?
CVE-2021-22922 is a vulnerability in curl that allows a file hash mismatch after downloading content using the metalink feature.
How does curl handle the file hash mismatch vulnerability (CVE-2021-22922)?
When curl is instructed to download content using the metalink feature, the contents are verified against a hash provided in the metalink XML file.
What is the severity of CVE-2021-22922?
CVE-2021-22922 has a severity rating of 6.5 (medium).
Which versions of curl are affected by CVE-2021-22922?
The vulnerability affects curl versions up to but excluding 7.78.0.
Where can I find more information about CVE-2021-22922?
More information about CVE-2021-22922 can be found on the GitHub commit, Red Hat Bugzilla, and the curl website.