# CVE-2024-6197: freeing stack buffer in utf8asn1str

- Severity: High 7.5 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 4.30%, higher than 91% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2024-07-24T07:29:50.003Z
- Modified: 2026-10-25T01:05:24.522Z
- Also known as: CURL-CVE-2024-6197
- Weaknesses: CWE-590
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: curl

## 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.

(As written by CVE List.)

## Affected

- curl curl: from 8.8.0 up to 8.8.0; from 8.7.1 up to 8.7.1; from 8.7.0 up to 8.7.0; from 8.6.0 up to 8.6.0; from 8.6.0 up to 8.8.0
- https://github.com/curl/curl.git: from 8.6.0 before 8.9.0; from 623c3a8fa0bdb2751f14b3741760d81910b7ec64 before 3a537a4db9e65e545ec45b1b5d5575ee09a2569d
- haxx libcurl: from 8.6.0 before 8.9.0

## Every score

- CISA-ADP: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- curl: rating Medium
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://hackerone.com/reports/2559516> (exploit, issue-tracking, technical-description)
- <https://curl.se/docs/CVE-2024-6197.json> (vendor-advisory)
- <https://curl.se/docs/CVE-2024-6197.html> (vendor-advisory)
- <http://www.openwall.com/lists/oss-security/2024/07/24/1> (mailing-list, third-party-advisory)
- <http://www.openwall.com/lists/oss-security/2024/07/24/5> (mailing-list, third-party-advisory)
- <https://security.netapp.com/advisory/ntap-20241129-0008/>

## Sources

- CVE List: [CVE-2024-6197](https://www.cve.org/CVERecord?id=CVE-2024-6197), CVE Terms of Use, modified 2025-02-13
- curl: [CURL-CVE-2024-6197](https://osv.dev/vulnerability/CURL-CVE-2024-6197), MIT, modified 2026-10-25
- NVD: [CVE-2024-6197](https://nvd.nist.gov/vuln/detail/CVE-2024-6197), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-6197 · Whole record: https://cve.day/CVE-2024-6197.json · Rebuilt by cve.day 2026-11-25T22:58:43.179Z
