https://github.com/curl/curl: Use After Free
CVE-2023-28319 is a high-severity use after free vulnerability in https://github.com/curl/curl, with a CVSS 3.1 base score of 7.5 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. Affected https://github.com/curl/curl versions: Fixed in 8.1.0. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 2.49% chance of exploitation within 30 days, higher than 85% of scored CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update Curl to 8.1.0 or a later version.
- Update macOS to 11.7.9 or 12.6.8 or 13.5, whichever matches your release line, or a later version.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Https://github.com/curl/curl | https://github.com/curl/curl | Fixed in 8.1.0 | Not stated |
| Haxx | Curl | before 8.1.0 | 8.1.0 |
| Apple | macOS | 11.0 up to, but not including, 11.7.9; 12.0 up to, but not including, 12.6.8; 13.0 up to, but not including, 13.5 | 11.7.9, 12.6.8, 13.5 |
| NetApp | Clustered Data Ontap | Not specified in the record | Not stated |
| NetApp | Ontap Antivirus Connector | Not specified in the record | Not stated |
| NetApp | H300s Firmware | Not specified in the record | Not stated |
| NetApp | H500s Firmware | Not specified in the record | Not stated |
| NetApp | H700s Firmware | Not specified in the record | Not stated |
| NetApp | H410s Firmware | Not specified in the record | Not stated |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- NoneNothing can be modified.
- Availability
- NoneAvailability is not affected.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.5 | High | NVD |
| CVSS 3.1 | 7.5 | High | CISA (ADP) |
Official description
A use after free vulnerability exists in curl <v8.1.0 in the way 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.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Use After Free
The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory belongs to the code that operates on the new pointer.
How developers prevent this class of flaw
- Choose a language that provides automatic memory management.
- When freeing pointers, be sure to set them to NULL once they are freed. However, the utilization of multiple or complex data structures may lower the usefulness of this strategy.
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: poc, automatable: yes, technical impact: partial).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- hackerone.com/reports/1913733Exploit, Third Party Advisory
Third-party and government advisories
- seclists.org/fulldisclosure/2023/Jul/47Mailing List, Third Party Advisory
- seclists.org/fulldisclosure/2023/Jul/48Mailing List, Third Party Advisory
- seclists.org/fulldisclosure/2023/Jul/52Mailing List, Third Party Advisory
- security.gentoo.org/glsa/202310-12Third Party Advisory
- security.netapp.com/advisory/ntap-20230609-0009/Third Party Advisory
- support.apple.com/kb/HT213843Third Party Advisory
- support.apple.com/kb/HT213844Third Party Advisory
- support.apple.com/kb/HT213845Third Party Advisory
Other vulnerabilities in https://github.com/curl/curl
- 8.8 High severity
- 8.8 High severity
- 9.1 Critical severity
- 7.5 High severity
- 9.8 Critical severity
- 9.8 Critical severity
Recent Use After Free vulnerabilities
- 9.8 Critical severity
- 9.8 Critical severity
- 7.5 High severity
- 8.8 High severity
- 8.8 High severity
- 8.8 High severity
Spotted an error? Tell us.