Bug 2229389 (CVE-2023-38697) - protocol-http1: rubygem Strict validation of content length and chunk length
Summary: protocol-http1: rubygem Strict validation of content length and chunk length
Keywords:
Status: NEW
Alias: CVE-2023-38697
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 2229390
TreeView+ depends on / blocked
 
Reported: 2023-08-05 15:29 UTC by Nick Tait
Modified: 2023-08-11 19:44 UTC (History)
6 users (show)

Fixed In Version: protocol-http1 0.15.1
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the protocol-http1 rubygem package. The protocol-http1 provides a low-level implementation of the HTTP/1 protocol. This behavior can lead to desync when forwarding through multiple HTTP parsers, potentially resulting in HTTP request smuggling and firewall bypassing.
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Nick Tait 2023-08-05 15:29:13 UTC
protocol-http1 provides a low-level implementation of the HTTP/1 protocol. RFC 9112 Section 7.1 defined the format of chunk size, chunk data and chunk extension. The value of Content-Length header should be a string of 0-9 digits, the chunk size should be a string of hex digits and should split from chunk data using CRLF, and the chunk extension shouldn't contain any invisible character. However, Falcon has following behaviors while disobey the corresponding RFCs: accepting Content-Length header values that have `+` prefix, accepting Content-Length header values that written in hexadecimal with `0x` prefix, accepting `0x` and `+` prefixed chunk size, and accepting LF in chunk extension. This behavior can lead to desync when forwarding through multiple HTTP parsers, potentially results in HTTP request smuggling and firewall bypassing. This issue is fixed in `protocol-http1` v0.15.1. There are no known workarounds.

https://github.com/socketry/protocol-http1/pull/20
https://www.rfc-editor.org/rfc/rfc9112#name-chunked-transfer-coding
https://github.com/socketry/protocol-http1/security/advisories/GHSA-6jwc-qr2q-7xwj
https://github.com/socketry/protocol-http1/commit/e11fc164fd2b36f7b7e785e69fa8859eb06bcedd


Note You need to log in before you can comment on or make changes to this bug.