Vulnerability · Published Aug 5, 2021 · Assigned by hackerone

CVE-2021-22922

Medium 6.5

In plain English

A medium-severity security flaw in https://github.com/curl/curl. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 4.3% (higher than 91% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)6.5Medium
Exploit odds (30 days)4.3%top 8.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
Alpine:v3.20curl7.78.0-r0ALPINE-CVE-2021-22922
Alpine:v3.21curl7.78.0-r0ALPINE-CVE-2021-22922
Alpine:v3.22curl7.78.0-r0ALPINE-CVE-2021-22922
Alpine:v3.23curl7.78.0-r0ALPINE-CVE-2021-22922
Alpine:v3.24curl7.78.0-r0ALPINE-CVE-2021-22922
Debian:12curl7.79.1-1DEBIAN-CVE-2021-22922
Debian:13curl7.79.1-1DEBIAN-CVE-2021-22922
Debian:14curl7.79.1-1DEBIAN-CVE-2021-22922
Rocky Linux:8curl0:7.61.1-18.el8_4.1RLSA-2021:3582

Affected products (as reported)

VendorProductVersions
n/a https://github.com/curl/curl curl 7.27.0 to and including 7.77.0

Weakness: CWE-840 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N

References