Advisory Database
  • Advisories
  • Dependency Scanning
  1. maven
  2. ›
  3. org.eclipse.jetty/jetty-http
  4. ›
  5. CVE-2023-40167

CVE-2023-40167: Jetty accepts "+" prefixed value in Content-Length

September 15, 2023 (updated October 13, 2023)

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.

References

  • github.com/advisories/GHSA-hmr7-m48g-48f6
  • github.com/eclipse/jetty.project/security/advisories/GHSA-hmr7-m48g-48f6
  • www.rfc-editor.org/rfc/rfc9110

Code Behaviors & Features

Detect and mitigate CVE-2023-40167 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 9.0.0 up to 9.4.51, all versions starting from 10.0.0 up to 10.0.15, all versions starting from 11.0.0 up to 11.0.15, version 12.0.0

Fixed versions

  • 9.4.52
  • 10.0.16
  • 11.0.16
  • 12.0.1

Solution

Upgrade to versions 9.4.52, 10.0.16, 11.0.16, 12.0.1 or above.

Impact 5.3 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-130: Improper Handling of Length Parameter Inconsistency

Source file

maven/org.eclipse.jetty/jetty-http/CVE-2023-40167.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 00:15:18 +0000.