CVE-2023-38039
JSON

7.5high

HTTP headers eat all memory

Severity
7.5high CVSS:3.1 by CISA-ADP
Exploit likelihood
56.2% (higher than 99% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
hackerone
Also known as
CURL-CVE-2023-38039

Description

When curl retrieves an HTTP response, it stores the incoming headers so that they can be accessed later via the libcurl headers API. However, curl did not have a limit in how many or how large headers it would accept in a response, allowing a malicious server to stream an endless series of headers and eventually cause curl to run out of heap memory.

Affected

Product or packageVersionsReported by
curl curlfrom 8.3.0 before 8.3.0
Not affected: from 7.84.0 before 7.84.0
CVE List
https://github.com/curl/curl.gitfrom 7.84.0 before 8.3.0, from 4d94fac9f0d1dd02b8308291e4c47651142dc28b before 3ee79c1674fd6f99e8efca52cd7510e08b766770curl
haxx curlfrom 7.84.0 before 8.3.0NVD
fedoraproject fedora37, 38, 39NVD
microsoft windows_10_1809before 10.0.17763.5122NVD
microsoft windows_10_21h2before 10.0.19044.3693NVD
microsoft windows_10_22h2before 10.0.19045.3693NVD
microsoft windows_11_21h2before 10.0.22000.2600NVD
microsoft windows_11_22h2before 10.0.22621.2715NVD
microsoft windows_11_23h2before 10.0.22631.2715NVD
microsoft windows_server_2019before 10.0.17763.5122NVD
microsoft windows_server_2022before 10.0.20348.2113NVD

All scores

CISA-ADP7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
curlmedium rating
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-770

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.

What each source says

CVE List

When curl retrieves an HTTP response, it stores the incoming headers so that they can be accessed later via the libcurl headers API. However, curl did not have a limit in how many or how large headers it would accept in a response, allowing a malicious server to stream an endless series of headers and eventually cause curl to run out of heap memory.

curl

When curl retrieves an HTTP response, it stores the incoming headers so that they can be accessed later via the libcurl headers API.

However, curl did not have a limit on the size or quantity of headers it would accept in a response, allowing a malicious server to stream an endless series of headers to a client and eventually cause curl to run out of heap memory.

NVD (es)

Cuando curl recupera una respuesta HTTP, almacena los encabezados entrantes para que se pueda acceder a ellos más tarde a través de la API de encabezados libcurl. Sin embargo, curl no tenía un límite en cuanto a la cantidad o el tamaño de encabezados que aceptaría en una respuesta, lo que permitía que un servidor malicioso transmitiera una serie interminable de encabezados y, finalmente, provocara que curl se quedara sin memoria dinámica.

References

https://hackerone.com/reports/2072338exploit, issue-tracking, patch, third-party-advisory
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TEAWTYHC3RT6ZRS5OZRHLAIENVN6CCIS/mailing-list
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/5DCZMYODALBLVOXVJEN2LF2MLANEYL4F/mailing-list
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/M6KGKB2JNZVT276JYSKI6FV2VFJUGDOJ/mailing-list
https://security.gentoo.org/glsa/202310-12third-party-advisory
https://security.netapp.com/advisory/ntap-20231013-0005/third-party-advisory
http://seclists.org/fulldisclosure/2023/Oct/17mailing-list, third-party-advisory
https://support.apple.com/kb/HT214036third-party-advisory
https://www.insyde.com/security-pledge/SA-2023064third-party-advisory
https://support.apple.com/kb/HT214063third-party-advisory
https://support.apple.com/kb/HT214057third-party-advisory
https://support.apple.com/kb/HT214058third-party-advisory

Sources

SourceRecordLicence
CVE ListCVE-2023-38039 changed 2025-12-02CVE Terms of Use
curlCURL-CVE-2023-38039 changed 2026-10-25MIT
NVDCVE-2023-38039 changed 2026-06-17Public domain