CVE-2024-6197

Public Exploit
freeing stack buffer in utf8asn1str

Description

libcurl's ASN1 parser has this utf8asn1str() function used for parsing an ASN.1 UTF-8 string. Itcan detect an invalid field and return error. Unfortunately, when doing so it also invokes `free()` on a 4 byte localstack buffer. Most modern malloc implementations detect this error and immediately abort. Some however accept the input pointer and add that memory to its list of available chunks. This leads to the overwriting of nearby stack memory. The content of the overwrite is decided by the `free()` implementation; likely to be memory pointers and a set of flags. The most likely outcome of exploting this flaw is a crash, although it cannot be ruled out that more serious results can be had in special circumstances.

7.5
CVSS
Severity: High
CVSS 3.1 •
EPSS 3.26% Top 15%
Vendor Advisory curl.se Vendor Advisory curl.se
Affected: curl curl
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2024-6197?
CVE-2024-6197 has been scored as a high severity vulnerability.
How to fix CVE-2024-6197?
To fix CVE-2024-6197, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2024-6197 being actively exploited in the wild?
It is possible that CVE-2024-6197 is being exploited or will be exploited in a near future based on public information. According to its EPSS score, there is a ~3% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2024-6197?
CVE-2024-6197 affects curl curl.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.