6.5medium
Wrong content via Metalink not discarded
- Severity
- 6.5medium CVSS:3.1 by CISA-ADP
- Exploit likelihood
- 4.33% (higher than 91% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- hackerone
- Also known as
- CURL-CVE-2021-22922
Description
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
| Product or package | Versions | Reported by |
|---|---|---|
| https://github.com/curl/curl | curl 7.27.0 to and including 7.77.0 | CVE List |
| https://github.com/curl/curl.git | from 7.27.0 before 7.78.0, from b5fdbe848bc3d088445817aa890d3f2f74ac5b02 before 265b14d6b37c4298bd5556fabcbc37d36f911693 | curl |
| haxx curl | from 7.27.0 before 7.78.0 | NVD |
| fedoraproject fedora | 33 | NVD |
| netapp cloud_backup | Not specified | NVD |
| netapp clustered_data_ontap | Not specified | NVD |
| netapp hci_management_node | Not specified | NVD |
| netapp solidfire | Not specified | NVD |
| oracle mysql_server | from 5.7.0 up to 5.7.35, from 8.0.0 up to 8.0.26 | NVD |
| siemens sinec_infrastructure_network_services | before 1.0.1.1 | NVD |
| netapp h300s_firmware | Not specified | NVD |
| netapp h500s_firmware | Not specified | NVD |
| netapp h700s_firmware | Not specified | NVD |
| netapp h300e_firmware | Not specified | NVD |
| netapp h500e_firmware | Not specified | NVD |
| netapp h700e_firmware | Not specified | NVD |
| netapp h410s_firmware | Not specified | NVD |
| splunk universal_forwarder | from 8.2.0 before 8.2.12, from 9.0.0 before 9.0.6, 9.1.0 | NVD |
All scores
| CISA-ADP | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
| curl | medium rating | |
| NVD | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
| NVD | 4.3medium CVSS:2.0 | AV:N/AC:M/Au:N/C:N/I:P/A:N |
Classification
What each source says
CVE List
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.
curl
When curl is instructed to download content using the Metalink feature, the contents 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 content from a set of different URLs, potentially hosted by different servers and the client can then download the file from one or several of them. In a serial or parallel manner.
If one of the servers hosting the contents has been breached and the contents of the specific file on that server is replaced with a modified payload, curl should detect this when the hash of the file mismatches after a completed download. It should remove the contents and instead try getting the contents from another URL. This is not done, and instead such a hash mismatch is only mentioned in text and the potentially malicious content is kept in the file on disk.
There is a risk the user does not notice the message and instead assumes the file is fine.
NVD (es)
Cuando es instruido a curl descargar un contenido usando la funcionalidad metalink, el contenido es comprobado con un hash proporcionado en el archivo XML metalink. El archivo XML metalink indica al cliente cómo obtener el mismo contenido de un conjunto de URLs diferentes, potencialmente alojadas en distintos servidores y el cliente puede entonces descargar el archivo de uno o varios de ellos. En una manera paralela o en serie. Si uno de los servidores que aloja el contenido ha sido violado y el contenido del archivo específico en ese servidor es reemplazado por una carga útil modificada, Curl debería detectar esto cuando el hash del archivo no coincide después de una descarga completa. Debería eliminar los contenidos y tratar de obtenerlo de otra URL. Esto no se hace, y en su lugar, tal desajuste de hash sólo se menciona en el texto y el contenido potencialmente malicioso se mantiene en el archivo en el disco
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-22922 changed 2026-10-14 | CVE Terms of Use |
| curl | CURL-CVE-2021-22922 changed 2026-10-25 | MIT |
| NVD | CVE-2021-22922 changed 2026-10-14 | Public domain |