{"id":"CVE-2023-36478","aliases":["CVE-2023-36478","GHSA-wgh7-54f2-x98r","BIT-JENKINS-2023-36478"],"related":[],"kind":"vulnerability","state":"published","title":"HTTP/2 HPACK integer overflow and buffer allocation","summary":"Eclipse Jetty provides a web server and servlet container. In versions 11.0.0 through 11.0.15, 10.0.0 through 10.0.15, and 9.0.0 through 9.4.52, an integer overflow in `MetaDataBuilder.checkSize` allows for HTTP/2 HPACK header values to\nexceed their size limit. `MetaDataBuilder.java` determines if a header name or value exceeds the size limit, and throws an exception if the limit is exceeded. However, when length is very large and huffman is true, the multiplication by 4 in line 295\nwill overflow, and length will become negative. `(_size+length)` will now be negative, and the check on line 296 will not be triggered. Furthermore, `MetaDataBuilder.checkSize` allows for user-entered HPACK header value sizes to be negative, potentially leading to a very large buffer allocation later on when the user-entered size is multiplied by 2. This means that if a user provides a negative length value (or, more precisely, a length value which, when multiplied by the 4/3 fudge factor, is negative), and this length value is a very large positive number when multiplied by 2, then the user can cause a very large buffer to be allocated on the server. Users of HTTP/2 can be impacted by a remote denial of service attack. The issue has been fixed in versions 11.0.16, 10.0.16, and 9.4.53. There are no known workarounds.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Eclipse Jetty provides a web server and servlet container. In versions 11.0.0 through 11.0.15, 10.0.0 through 10.0.15, and 9.0.0 through 9.4.52, an integer overflow in `MetaDataBuilder.checkSize` allows for HTTP/2 HPACK header values to\nexceed their size limit. `MetaDataBuilder.java` determines if a header name or value exceeds the size limit, and throws an exception if the limit is exceeded. However, when length is very large and huffman is true, the multiplication by 4 in line 295\nwill overflow, and length will become negative. `(_size+length)` will now be negative, and the check on line 296 will not be triggered. Furthermore, `MetaDataBuilder.checkSize` allows for user-entered HPACK header value sizes to be negative, potentially leading to a very large buffer allocation later on when the user-entered size is multiplied by 2. This means that if a user provides a negative length value (or, more precisely, a length value which, when multiplied by the 4/3 fudge factor, is negative), and this length value is a very large positive number when multiplied by 2, then the user can cause a very large buffer to be allocated on the server. Users of HTTP/2 can be impacted by a remote denial of service attack. The issue has been fixed in versions 11.0.16, 10.0.16, and 9.4.53. There are no known workarounds.","source":"cvelist"},{"lang":"en","text":"An integer overflow in `MetaDataBuilder.checkSize` allows for HTTP/2 HPACK header values to\nexceed their size limit. \n\nIn `MetaDataBuilder.java`, the following code determines if a header name or value\nexceeds the size limit, and throws an exception if the limit is exceeded:\n\n```java\n291 public void checkSize(int length, boolean huffman) throws SessionException\n292 {\n293 // Apply a huffman fudge factor\n294 if (huffman)\n295 length = (length * 4) / 3;\n296 if ((_size + length) > _maxSize)\n297 throw new HpackException.SessionException(\"Header too large %d > %d\",\n_size + length, _maxSize);\n298 }\n```\n\nHowever, when length is very large and huffman is true, the multiplication by 4 in line 295\nwill overflow, and length will become negative. (_size+length) will now be negative, and\nthe check on line 296 will not be triggered.\n\nFurthermore, `MetaDataBuilder.checkSize` allows for user-entered HPACK header value sizes to be\nnegative, potentially leading to a very large buffer allocation later on when the\nuser-entered size is multiplied by 2.\n\nIn `MetaDataBuilder.java`, the following code determines if a header name or value\nexceeds the size limit, and throws an exception if the limit is exceeded:\n\n```java\npublic void checkSize(int length, boolean huffman) throws SessionException\n{\n// Apply a huffman fudge factor\nif (huffman)\nlength = (length * 4) / 3;\nif ((_size + length) > _maxSize)\nthrow new HpackException.SessionException(\"Header too large %d > %d\", _size\n+ length, _maxSize);\n}\n```\n\nHowever, no exception is thrown in the case of a negative size.\nLater, in `Huffman.decode`, the user-entered length is multiplied by 2 before allocating a buffer:\n\n```java\npublic static String decode(ByteBuffer buffer, int length) throws\nHpackException.CompressionException\n{\nUtf8StringBuilder utf8 = new Utf8StringBuilder(length * 2);\n// ...\n```\n\nThis means that if a user provides a negative length value (or, more precisely, a length\nvalue which, when multiplied by the 4/3 fudge factor, is negative), and this length value is a\nvery large positive number when multiplied by 2, then the user can cause a very large\nbuffer to be allocated on the server.\n\n\n### Exploit Scenario 1\nAn attacker repeatedly sends HTTP messages with the HPACK header 0x00ffffffffff02.\nEach time this header is decoded:\n+ `HpackDecode.decode` will determine that a Huffman-coded value of length\n805306494 needs to be decoded.\n+ `MetaDataBuilder.checkSize` will approve this length.\n+ Huffman.decode will allocate a 1.6 GB string array.\n+ Huffman.decode will have a buffer overflow error, and the array will be deallocated\nthe next time garbage collection happens. (Note: this can be delayed by appending\nvalid huffman-coded characters to the end of the header.)\n\nDepending on the timing of garbage collection, the number of threads, and the amount of\nmemory available on the server, this may cause the server to run out of memory.\n\n\n### Exploit Scenario 2\nAn attacker repeatedly sends HTTP messages with the HPACK header 0x00ff8080ffff0b. Each\ntime this header is decoded:\n + HpackDecode.decode will determine that a Huffman-coded value of length\n-1073758081 needs to be decoded\n +  MetaDataBuilder.checkSize will approve this length\n + The number will be multiplied by 2 to get 2147451134, and Huffman.decode will\nallocate a 2.1 GB string array\n + Huffman.decode will have a buffer overflow error, and the array will be deallocated\nthe next time garbage collection happens (Note that this deallocation can be\ndelayed by adding valid Huffman-coded characters to the end of the header)\n\nDepending on the timing of garbage collection, the number of threads, and the amount of\nmemory available on the server, this may cause the server to run out of memory.\n\n### Impact\nUsers of HTTP/2 can be impacted by a remote denial of service attack.\n\n### Patches\nFixed in Jetty 10.0.16 and Jetty 11.0.16\nFixed in Jetty 9.4.53\nJetty 12.x is unaffected.\n\n### Workarounds\nNo workarounds possible, only patched versions of Jetty.\n\n### References\n* https://github.com/eclipse/jetty.project/pull/9634","format":"markdown","source":"ghsa"},{"lang":"es","text":"Eclipse Jetty proporciona un servidor web y un contenedor de servlets. En las versiones 11.0.0 a 11.0.15, 10.0.0 a 10.0.15 y 9.0.0 a 9.4.52, un desbordamiento de enteros en `MetaDataBuilder.checkSize` permite que los valores del encabezado HTTP/2 HPACK excedan su límite de tamaño. `MetaDataBuilder.java` determina si el nombre o valor de un encabezado excede el límite de tamaño y genera una excepción si se excede el límite. Sin embargo, cuando la longitud es muy grande y Huffman es verdadera, la multiplicación por 4 en la línea 295 se desbordará y la longitud se volverá negativa. `(_size+length)` ahora será negativo y la verificación en la línea 296 no se activará. Además, `MetaDataBuilder.checkSize` permite que los tamaños de los valores del encabezado HPACK ingresados por el usuario sean negativos, lo que podría generar una asignación de búfer muy grande más adelante cuando el tamaño ingresado por el usuario se multiplique por 2. Esto significa que si un usuario proporciona un tamaño con valor de longitud negativo (o, más precisamente, un valor de longitud que, cuando se multiplica por el factor de manipulación 4/3, es negativo), y este valor de longitud es un número positivo muy grande cuando se multiplica por 2, entonces el usuario puede causar un valor de longitud muy grande de búfer que se asignará en el servidor. Los usuarios de HTTP/2 pueden verse afectados por un ataque remoto de denegación de servicio. El problema se solucionó en las versiones 11.0.16, 10.0.16 y 9.4.53. No se conocen workarounds.","source":"nvd"}],"published":"2023-10-10T16:53:07.063Z","modified":"2026-09-10T03:50:08.942Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"HIGH"}],"cwes":["CWE-190","CWE-400"],"affected":[{"ranges":[{"version":">= 10.0.0, < 10.0.16","status":"affected"},{"version":">= 11.0.0, < 11.0.16","status":"affected"},{"version":">= 9.3.0, < 9.4.53","status":"affected"}],"vendor":"eclipse","product":"jetty.project","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"10.0.0","status":"affected","fixed":"10.0.16"}],"ecosystem":"Maven","package":"org.eclipse.jetty.http2:http2-hpack","purl":"pkg:maven/org.eclipse.jetty.http2/http2-hpack","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"11.0.0","status":"affected","fixed":"11.0.16"}],"ecosystem":"Maven","package":"org.eclipse.jetty.http2:http2-hpack","purl":"pkg:maven/org.eclipse.jetty.http2/http2-hpack","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"10.0.0","status":"affected","fixed":"10.0.16"}],"ecosystem":"Maven","package":"org.eclipse.jetty.http3:http3-qpack","purl":"pkg:maven/org.eclipse.jetty.http3/http3-qpack","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"11.0.0","status":"affected","fixed":"11.0.16"}],"ecosystem":"Maven","package":"org.eclipse.jetty.http3:http3-qpack","purl":"pkg:maven/org.eclipse.jetty.http3/http3-qpack","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"9.3.0","status":"affected","fixed":"9.4.53"}],"ecosystem":"Maven","package":"org.eclipse.jetty.http2:http2-hpack","purl":"pkg:maven/org.eclipse.jetty.http2/http2-hpack","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"9.3.0","fixed":"9.4.53"},{"status":"affected","introduced":"10.0.0","fixed":"10.0.16"},{"status":"affected","introduced":"11.0.0","fixed":"11.0.16"}],"vendor":"eclipse","product":"jetty","cpe":"cpe:2.3:a:eclipse:jetty:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","fixed":"2.414.3"},{"status":"affected","fixed":"2.428"}],"vendor":"jenkins","product":"jenkins","cpe":"cpe:2.3:a:jenkins:jenkins:*:*:*:*:lts:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"10.0"},{"status":"affected","version":"11.0"},{"status":"affected","version":"12.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.428.0"}],"ecosystem":"Bitnami","package":"jenkins","purl":"pkg:bitnami/jenkins","source":"bitnami"}],"references":[{"url":"https://github.com/eclipse/jetty.project/security/advisories/GHSA-wgh7-54f2-x98r","tags":["advisory","exploit","vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://github.com/eclipse/jetty.project/pull/9634","tags":["fix","issue-tracking","patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://github.com/eclipse/jetty.project/releases/tag/jetty-10.0.16","tags":["article","release-notes","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://github.com/eclipse/jetty.project/releases/tag/jetty-11.0.16","tags":["article","release-notes","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://github.com/eclipse/jetty.project/releases/tag/jetty-9.4.53.v20231009","tags":["article","release-notes","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"http://www.openwall.com/lists/oss-security/2023/10/18/4","tags":["advisory","mailing-list","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://lists.debian.org/debian-lts-announce/2023/10/msg00045.html","tags":["discussion","mailing-list","web","x-transferred"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://www.debian.org/security/2023/dsa-5540","tags":["advisory","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://security.netapp.com/advisory/ntap-20231116-0011/","tags":["advisory","third-party-advisory","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://security.netapp.com/advisory/ntap-20240621-0006/","tags":["web","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://github.com/jetty/jetty.project/security/advisories/GHSA-wgh7-54f2-x98r","tags":["web"],"sources":["ghsa"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-36478","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://github.com/eclipse/jetty.project","tags":["package"],"sources":["ghsa"]},{"url":"https://security.netapp.com/advisory/ntap-20231116-0011","tags":["web"],"sources":["ghsa"]},{"url":"https://security.netapp.com/advisory/ntap-20240621-0006","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-36478","url":"https://www.cve.org/CVERecord?id=CVE-2023-36478","licence":"CVE Terms of Use","modified":"2025-02-13T16:56:19.080Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-wgh7-54f2-x98r","url":"https://github.com/advisories/GHSA-wgh7-54f2-x98r","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:08.942Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-36478","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-36478","licence":"Public domain","modified":"2026-06-17T06:06:21.220Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-JENKINS-2023-36478","url":"https://osv.dev/vulnerability/BIT-JENKINS-2023-36478","licence":"Apache-2.0","modified":"2026-09-08T08:47:58.223Z"}],"updatedAt":"2026-11-25T22:58:28.600Z","epss":{"score":0.04832,"percentile":0.92186,"date":"2026-12-01T12:00:22.000Z"}}