Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: GSA_kwCzR0hTQS1obXI3LW00OGctNDhmNs4AA13o
Jetty accepts "+" prefixed value in Content-Length
Impact
Jetty accepts the '+' character proceeding the content-length value in a HTTP/1 header field. This is more permissive than allowed by the RFC and other servers routinely reject such requests with 400 responses. There is no known exploit scenario, but it is conceivable that request smuggling could result if jetty is used in combination with a server that does not close the connection after sending such a 400 response.
Workarounds
There is no workaround as there is no known exploit scenario.
Original Report
RFC 9110 Secion 8.6 defined the value of Content-Length header should be a string of 0-9 digits. However we found that Jetty accepts "+" prefixed Content-Length, which could lead to potential HTTP request smuggling.
Payload:
POST / HTTP/1.1
Host: a.com
Content-Length: +16
Connection: close
0123456789abcdef
When sending this payload to Jetty, it can successfully parse and identify the length.
When sending this payload to NGINX, Apache HTTPd or other HTTP servers/parsers, they will return 400 bad request.
This behavior can lead to HTTP request smuggling and can be leveraged to bypass WAF or IDS.
Permalink: https://github.com/advisories/GHSA-hmr7-m48g-48f6JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1obXI3LW00OGctNDhmNs4AA13o
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: over 1 year ago
Updated: about 1 year ago
CVSS Score: 5.3
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
EPSS Percentage: 0.00103
EPSS Percentile: 0.42969
Identifiers: GHSA-hmr7-m48g-48f6, CVE-2023-40167
References:
- https://github.com/eclipse/jetty.project/security/advisories/GHSA-hmr7-m48g-48f6
- https://www.rfc-editor.org/rfc/rfc9110#section-8.6
- https://nvd.nist.gov/vuln/detail/CVE-2023-40167
- https://www.debian.org/security/2023/dsa-5507
- https://lists.debian.org/debian-lts-announce/2023/09/msg00039.html
- https://github.com/advisories/GHSA-hmr7-m48g-48f6
Blast Radius: 20.7
Affected Packages
maven:org.eclipse.jetty:jetty-http
Dependent packages: 1,031Dependent repositories: 8,057
Downloads:
Affected Version Ranges: = 12.0.0, >= 11.0.0, <= 11.0.15, >= 10.0.0, <= 10.0.15, >= 9.0.0, <= 9.4.51
Fixed in: 12.0.1, 11.0.16, 10.0.16, 9.4.52
All affected versions: 10.0.0, 10.0.1, 10.0.2, 10.0.3, 10.0.4, 10.0.5, 10.0.6, 10.0.7, 10.0.8, 10.0.9, 10.0.10, 10.0.11, 10.0.12, 10.0.13, 10.0.14, 10.0.15, 11.0.0, 11.0.1, 11.0.2, 11.0.3, 11.0.4, 11.0.5, 11.0.6, 11.0.7, 11.0.8, 11.0.9, 11.0.10, 11.0.11, 11.0.12, 11.0.13, 11.0.14, 11.0.15, 12.0.0
All unaffected versions: 10.0.16, 10.0.17, 10.0.18, 10.0.19, 10.0.20, 10.0.21, 10.0.22, 10.0.23, 10.0.24, 11.0.16, 11.0.17, 11.0.18, 11.0.19, 11.0.20, 11.0.21, 11.0.22, 11.0.23, 11.0.24, 12.0.1, 12.0.2, 12.0.3, 12.0.4, 12.0.5, 12.0.6, 12.0.7, 12.0.8, 12.0.9, 12.0.10, 12.0.11, 12.0.12, 12.0.13, 12.0.14, 12.0.15