Security Advisory

CVE-2024-6197: curl ASN.1 Parser Frees Stack Buffer

Last updated:
  • CVE-2024-6197

CVE-2024-6197 is a bug in libcurl's ASN.1 parser: when utf8asn1str() rejects an invalid field in a TLS certificate, it calls free() on a 4-byte stack buffer, which usually crashes the program. It affects curl 8.6.0 to 8.8.0 built with GnuTLS, wolfSSL, Schannel, Secure Transport or mbedTLS, and curl 8.9.0 fixed it.

Vulnerability summary

CVSS base score

7.5

High severity

EPSS score (FIRST)

4.3%

Probability of exploitation in the wild in the next 30 days

CISA KEV catalog

No

Not listed

Published

Vulnerability ID: CVE-2024-6197 · Source: NVD

Affected components

ComponentCPEVersion range
curl / libcurl (ASN.1 parser, utf8asn1str)cpe:2.3:a:haxx:libcurl:*:*:*:*:*:*:*:*8.6.0 up to and including 8.8.0, GnuTLS, wolfSSL, Schannel, Secure Transport or mbedTLS builds only (fixed in 8.9.0, 24 July 2024)
Siemens SINEC OS on RUGGEDCOM RST2428P and SCALANCE XCM-/XRM-/XCH-/XRH-300—before V3.2 (fixed in V3.2, per SSA-355557); listed again before V3.3 (fixed in V3.3, per SSA-089022)
Siemens SCALANCE XC-300/XR-300/XC-400/XR-500 family—listed in SSA-355557 and SSA-089022 (update to V3.2 or V3.3 respectively)

What does this mean for affected devices?

CVE-2024-6197 is a "free of memory not on the heap" bug (CWE-590 in the curl advisory) in libcurl's ASN.1 parser. The curl advisory explains that utf8asn1str(), which parses an ASN.1 UTF-8 string, "can detect an invalid field and return error. Unfortunately, when doing so it also invokes free() on a 4 byte local stack buffer." Most malloc implementations detect this and abort; some "accept the input pointer and add that memory to its list of available chunks", which "leads to the overwriting of nearby stack memory". curl rates it Medium and calls a crash the most likely outcome, while "it cannot be ruled out that more serious results can be had in special circumstances". NVD's Primary CVSS 3.1 score is 7.5, vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H (NVD).

The trigger is a TLS certificate: the advisory says the code path "can be triggered by a malicious server offering an especially crafted TLS certificate". It affects curl 8.6.0 to 8.8.0, where a refactor introduced it, and curl 8.9.0 fixed it on 24 July 2024, announced on oss-security the same day.

The TLS backend decides whether a device build is exposed. curl states that "the vulnerable code can only be reached when curl is built to use GnuTLS, wolfSSL, Schannel, Secure Transport or mbedTLS. Builds using other TLS backends are not vulnerable." OpenSSL builds are out of scope, but embedded builds often pick mbedTLS or wolfSSL to save space. The malloc implementation matters too: a C library whose free() accepts the stack pointer turns the abort into stack corruption. Run curl -V on a test unit, or read the libcurl/ version string and linked TLS library from the image, before ranking the finding.

Siemens ProductCERT lists SINEC OS network devices as affected and scores the CVE 7.5. SSA-355557 covers SINEC OS before V3.2 on the RUGGEDCOM RST2428P and the SCALANCE XCM-/XRM-/XCH-/XRH-300 and XC-300/XR-300/XC-400/XR-500 families, with V3.2 as the fix. SSA-089022, first published 2026-01-28, lists the CVE again for SINEC OS before V3.3 on the RUGGEDCOM RST2428P and SCALANCE XCM332, XCM324, XCM328, XCH328, XRH334 and XRM334 models, with V3.3 as the fix. Distribution packages often predate the bug: the Debian tracker marks bullseye and bookworm not affected because the vulnerable code was introduced later.

This CVE is not in the CISA KEV catalog as of 2026-11-16 (catalog version 2026.11.13, CISA KEV). FIRST EPSS gives it 0.043, the 91.3rd percentile, in its 2026-11-15 dataset (FIRST EPSS).

curl's recommendations, in order: upgrade to 8.9.0, apply the patch to the version in use, or build libcurl with an unaffected TLS backend. Our libcurl vulnerabilities in embedded firmware guide shows how to find each libcurl copy in an image and read its TLS backend, and the memory corruption fix guide covers verifying a memory-safety fix in the shipped binary. For a libcurl flaw that does not depend on the TLS backend, see CVE-2023-38545.

How to fix this class of issueNo dedicated SoftWSP guide covers this weakness class; the fix is usually the vendor patch or firmware update referenced above. Our related guide explains how to plan and verify it: NIST SP 800-40 Rev. 4: enterprise patch management planning, explained.

Evidence

  • utf8asn1str() invokes free() on a 4-byte local stack buffer on invalid field; most likely outcome a crash; triggered by a crafted TLS certificate; reachable only with GnuTLS, wolfSSL, Schannel, Secure Transport or mbedTLS; affected 8.6.0 to 8.8.0; fixed 8.9.0 (24 Jul 2024); severity Medium; CWE-590; recommendations upgrade, patch, or unaffected TLS backend. — curl security advisory
  • NVD Primary CVSS 3.1 7.5 (A:H); CPE libcurl 8.6.0 to before 8.9.0. — NVD
  • curl security advisory posted to oss-security on 2024-07-24. — oss-security
  • SINEC OS before V3.2 on RUGGEDCOM RST2428P, SCALANCE XCM-/XRM-/XCH-/XRH-300 and XC-300/XR-300/XC-400/XR-500 families affected; fix V3.2; Siemens CVSS 7.5. — Siemens SSA-355557
  • SSA-089022 (initial 2026-01-28) lists CVE-2024-6197 for SINEC OS before V3.3 on RUGGEDCOM RST2428P and SCALANCE XCM332, XCM324, XCM328, XCH328, XRH334, XRM334; fix V3.3. — Siemens SSA-089022
  • Debian bullseye and bookworm not affected (vulnerable code introduced later). — Debian Security Tracker
  • Not in the CISA KEV catalog version 2026.11.13 as of 2026-11-16. — CISA KEV
  • EPSS 0.04296, percentile 0.91285, dataset 2026-11-15. — FIRST EPSS

Related advisories

Sources

  1. NVD
  2. curl: CVE-2024-6197 freeing stack buffer in utf8asn1str
  3. oss-security: curl CVE-2024-6197 advisory (2024-07-24)
  4. Siemens SSA-355557 (SINEC OS before V3.2)
  5. Siemens SSA-089022 (SINEC OS before V3.3)
  6. Debian Security Tracker
  7. CISA KEV
  8. CISA KEV data (catalog JSON)
  9. FIRST EPSS

Frequently asked questions

Is a libcurl build with OpenSSL affected by CVE-2024-6197?

No. curl states the vulnerable code can only be reached when curl is built to use GnuTLS, wolfSSL, Schannel, Secure Transport or mbedTLS; builds using other TLS backends are not vulnerable (per the curl advisory).

How is CVE-2024-6197 triggered?

By a malicious server offering a specially crafted TLS certificate, so a device is exposed when its libcurl connects to a server an attacker controls or can impersonate (per the curl advisory).

Which industrial devices are affected by CVE-2024-6197?

Siemens SSA-355557 lists SINEC OS before V3.2 on the RUGGEDCOM RST2428P and SCALANCE XCM-/XRM-/XCH-/XRH-300 and XC-/XR- families; SSA-089022 lists SINEC OS before V3.3 on the RST2428P and several SCALANCE XCM, XCH, XRH and XRM models (per Siemens ProductCERT).

Is CVE-2024-6197 in the CISA KEV catalog?

No, it is absent from catalog version 2026.11.13 as of 2026-11-16. FIRST EPSS gives it 0.043, the 91.3rd percentile, in the 2026-11-15 dataset (per CISA KEV and FIRST EPSS).