CVE-2018-1000005
JSON

9.1critical

HTTP/2 trailer out-of-bounds read

Severity
9.1critical CVSS:3.0 by NVD
Exploit likelihood
4.56% (higher than 91% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
CURL-CVE-2018-1000005

Description

libcurl 7.49.0 to and including 7.57.0 contains an out bounds read in code handling HTTP/2 trailers. It was reported (https://github.com/curl/curl/pull/2231) that reading an HTTP/2 trailer could mess up future trailers since the stored size was one byte less than required. The problem is that the code that creates HTTP/1-like headers from the HTTP/2 trailer data once appended a string like `:` to the target buffer, while this was recently changed to `: ` (a space was added after the colon) but the following math wasn't updated correspondingly. When accessed, the data is read out of bounds and causes either a crash or that the (too large) data gets passed to client write. This could lead to a denial-of-service situation or an information disclosure if someone has a service that echoes back or uses the trailers for something.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
https://github.com/curl/curl.gitfrom 7.49.0 before 7.58.0, from 0761a51ee0551ad9e523cbdba24ce00d22fff9c1 before fa3dbb9a147488a2943bda809c66fc497efe06cbcurl
haxx libcurlfrom 7.49.0 up to 7.57.0NVD
debian debian_linux8.0, 9.0NVD
canonical ubuntu_linux14.04, 16.04, 17.10NVD

All scores

curllow rating
NVD9.1critical CVSS:3.0CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
NVD6.4medium CVSS:2.0AV:N/AC:L/Au:N/C:P/I:N/A:P

Classification

What each source says

CVE List

libcurl 7.49.0 to and including 7.57.0 contains an out bounds read in code handling HTTP/2 trailers. It was reported (https://github.com/curl/curl/pull/2231) that reading an HTTP/2 trailer could mess up future trailers since the stored size was one byte less than required. The problem is that the code that creates HTTP/1-like headers from the HTTP/2 trailer data once appended a string like `:` to the target buffer, while this was recently changed to `: ` (a space was added after the colon) but the following math wasn't updated correspondingly. When accessed, the data is read out of bounds and causes either a crash or that the (too large) data gets passed to client write. This could lead to a denial-of-service situation or an information disclosure if someone has a service that echoes back or uses the trailers for something.

curl

libcurl contains an out bounds read in code handling HTTP/2 trailers.

It was reported that reading an HTTP/2 trailer could mess up future trailers since the stored size was one byte less than required.

The problem is that the code that creates HTTP/1-like headers from the HTTP/2 trailer data once appended a string like ":" to the target buffer, while this was recently changed to ": " (a space was added after the colon) but the associated math was not updated correspondingly.

When accessed, the data is read out of bounds and causes either a crash or that the (too large) data gets passed to the libcurl callback. This might lead to a denial-of-service situation or an information disclosure if someone has a service that echoes back or uses the trailers for something.

NVD (es)

libcurl 7.49.0 hasta e incluyendo la versión 7.57.0 contiene una lectura fuera de límites en los trailers de manipulación de código HTTP/2. Se ha notificado (https://github.com/curl/curl/pull/2231) que la lectura de un trailer HTTP/2 podría dañar futuros trailers debido a que el tamaño almacenado era un byte menor de lo requerido. El problema es que el código que crea cabeceras como HTTP/1 de los datos del trailer HTTP/2 anexaron una cadena como ":" en el búfer objetivo, a pesar de que se había cambiado recientemente a ": " (se añadió un espacio después de los dos puntos), pero la siguiente matemática no se actualizó debidamente. Al acceder a ellos, los datos se leen fuera de límites y provocan o un cierre inesperado o que los datos (demasiado grandes) se pasen a escritura del cliente. Esto podría conducir a una situación de denegación de servicio (DoS) o a una divulgación de información si alguien tiene un servicio que devuelva ecos o que emplee los trailers para algo.

References

http://www.securitytracker.com/id/1040273third-party-advisory, vdb-entry
https://usn.ubuntu.com/3554-1/third-party-advisory, vendor-advisory
https://www.debian.org/security/2018/dsa-4098third-party-advisory, vendor-advisory
https://curl.haxx.se/docs/adv_2018-824a.htmlpatch, vendor-advisory
https://github.com/curl/curl/pull/2231issue-tracking, patch, third-party-advisory
https://access.redhat.com/errata/RHSA-2019:1543vendor-advisory

Sources

SourceRecordLicence
CVE ListCVE-2018-1000005 changed 2024-08-05CVE Terms of Use
curlCURL-CVE-2018-1000005 changed 2026-10-25MIT
NVDCVE-2018-1000005 changed 2026-06-17Public domain