First published: Thu Sep 14 2023(Updated: )
### 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](https://www.rfc-editor.org/rfc/rfc9110#section-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.
Credit: security-advisories@github.com security-advisories@github.com security-advisories@github.com
Affected Software | Affected Version | How to fix |
---|---|---|
maven/org.eclipse.jetty:jetty-http | =12.0.0 | 12.0.1 |
maven/org.eclipse.jetty:jetty-http | >=11.0.0<=11.0.15 | 11.0.16 |
maven/org.eclipse.jetty:jetty-http | >=10.0.0<=10.0.15 | 10.0.16 |
maven/org.eclipse.jetty:jetty-http | >=9.0.0<=9.4.51 | 9.4.52 |
Eclipse Jetty | >=9.0.0<9.4.52 | |
Eclipse Jetty | >=10.0.0<10.0.16 | |
Eclipse Jetty | >=11.0.0<11.0.16 | |
Eclipse Jetty | =12.0.0 | |
Eclipse Jetty | =12.0.0-beta0 | |
Eclipse Jetty | =12.0.0-beta1 | |
Eclipse Jetty | =12.0.0-beta2 | |
Eclipse Jetty | =12.0.0-beta3 | |
Eclipse Jetty | =12.0.0-beta4 | |
Debian Debian Linux | =10.0 | |
Debian Debian Linux | =11.0 | |
Debian Debian Linux | =12.0 | |
debian/jetty9 | <=9.4.16-0+deb10u1 | 9.4.50-4+deb10u1 9.4.39-3+deb11u2 9.4.50-4+deb11u1 9.4.50-4+deb12u2 9.4.53-1 |
redhat/jetty | <9.4.52 | 9.4.52 |
redhat/jetty | <10.0.16 | 10.0.16 |
redhat/jetty | <11.0.6 | 11.0.6 |
redhat/jetty | <12.0.1 | 12.0.1 |
IBM IBM® Db2® on Cloud Pak for Data and Db2 Warehouse on Cloud Pak for Data | <=v3.5 through refresh 10v4.0 through refresh 9v4.5 through refresh 3v4.6 through refresh 6v4.7 through refresh 4v4.8 through refresh 4 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
CVE-2023-40167 is a vulnerability in Jetty, a Java-based web server and servlet engine, that allows the '+' character preceding the content-length value in an HTTP/1 header field, which is more permissive than allowed by the RFC and can lead to potential security issues.
The impact of CVE-2023-40167 is that Jetty accepts requests with the '+' character before the content-length value, which is not compliant with the RFC and may be rejected by other servers. Although there is no known exploit scenario, it could potentially be used for request smuggling attacks.
CVE-2023-40167 has a severity rating of 5.3, which is considered medium.
To fix CVE-2023-40167, it is recommended to upgrade to versions 9.4.52, 10.0.16, 11.0.16, or 12.0.1 of Jetty to ensure compliance with the RFC and mitigate potential security risks.
More information about CVE-2023-40167 can be found in the following references: [GitHub Advisory](https://github.com/eclipse/jetty.project/security/advisories/GHSA-hmr7-m48g-48f6), [RFC 9110](https://www.rfc-editor.org/rfc/rfc9110#section-8.6), and [NVD](https://nvd.nist.gov/vuln/detail/CVE-2023-40167).