CVE-2022-32221: When doing HTTP(S) transfers, libcurl might erroneously use the read callback (...
9.8
Basic Information
Technical Details
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The analysis started by examining the provided vulnerability description and reference URLs. The HackerOne report was particularly useful as it linked to a GitHub issue. Although the GitHub issue itself didn't directly contain commit SHAs, it provided context. The HackerOne report also mentioned that the fix was in curl version 7.86.0. By using get_repo_tags, I found the SHA for the curl-7_86_0 tag. To pinpoint the exact fixing commit, I compared this tag with the previous version's tag (curl-7_85_0) using compare_two_commits. This revealed a list of commits between the two versions. I identified the relevant commit (a64e3e59938abd7d667e4470a18072a24d7e9de9) by its commit message, which directly referenced the GitHub issue number associated with the vulnerability. get_commit_infos provided the diff for this commit, showing the modification in lib/setopt.c within the Curl_vsetopt function. The patch added data->set.upload = FALSE; when CURLOPT_POST is set, which is the core of the fix. Therefore, Curl_vsetopt is the vulnerable function as it contained the logic flaw that was corrected by the patch.