Internet Bug Bounty · Report #1997312
CVE-2023-28319: UAF in SSH sha256 fingerprint check
Summary
CVE-2023-28319 - UAF in SSH sha256 fingerprint check
VULNERABILITY libcurl offers a feature to verify an SSH server's public key using a SHA 256 hash. When this check fails, libcurl would free the memory for the fingerprint before it returns an error message containing the (now freed) hash.
This flaw risks inserting sensitive heap-based data into the error message that might be shown to users or otherwise get leaked and revealed.
SOLUTION Fixed-in: https://github.com/curl/curl/commit/8e21b1a05f3c0ee098dbcb6c
TIMELINE This issue was reported to the curl project on March 21 2023. We contacted distros @ openwall on May 9, 2023.
curl 8.1.0 was released on May 17 2023, coordinated with the publication of this advisory.
CREDITS Reported-by: Wei Chong Tan Patched-by: Daniel Stenberg Thanks a lot!
Link to full Security Advisory: https://curl.se/docs/CVE-2023-28319.html
How it was found
libcurl offers a feature to verify an SSH server's public key using a SHA 256 hash. When this check fails, libcurl would free the memory for the fingerprint before it returns an error message containing the (now freed) hash.
Affected versions: curl 7.81.0 to and including 8.0.1 Not affected versions: curl < 7.81.0 and curl >= 8.1.0
The original submission can be found here: https://hackerone.com/reports/1913733
Impact
This flaw risks inserting sensitive heap-based data into the error message that might be shown to users or otherwise get leaked and revealed.