Files
CVEs-PoC/2021/CVE-2021-22922.md
T
2025-09-29 21:09:30 +02:00

22 lines
1.6 KiB
Markdown

### [CVE-2021-22922](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-22922)
![](https://img.shields.io/static/v1?label=Product&message=https%3A%2F%2Fgithub.com%2Fcurl%2Fcurl&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=curl%207.27.0%20%20to%20and%20including%207.77.0%20&color=brightgreen)
![](https://img.shields.io/static/v1?label=Vulnerability&message=Business%20Logic%20Errors%20(CWE-840)&color=brightgreen)
### 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.
### POC
#### Reference
- https://www.oracle.com/security-alerts/cpuoct2021.html
#### Github
- https://github.com/ARPSyndicate/cvemon
- https://github.com/Sudrien/metalink4-ruby
- https://github.com/Thaeimos/aws-eks-image
- https://github.com/kenlavbah/log4jnotes
- https://github.com/n0-traces/cve_monitor