GHSA-6jwc-qr2q-7xwj

Suggest an improvement
Source
https://github.com/advisories/GHSA-6jwc-qr2q-7xwj
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/08/GHSA-6jwc-qr2q-7xwj/GHSA-6jwc-qr2q-7xwj.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-6jwc-qr2q-7xwj
Aliases
Published
2023-08-03T16:36:34Z
Modified
2024-02-16T08:03:51.270741Z
Severity
  • CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N
Summary
protocol-http1 HTTP Request/Response Smuggling vulnerability
Details

Impact

RFC 9112 Section 7.1 defined the format of chunk size, chunk data and chunk extension (detailed ABNF is in Appendix section).

In summary:

  • 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.
  • The chunk extension shouldn't contain any invisible character.

However, we found that Falcon has following behaviors while disobey the corresponding RFCs.

  • Falcon accepts Content-Length header values that have "+" prefix.
  • Falcon accepts Content-Length header values that written in hexadecimal with "0x" prefix.
  • Falcon accepts "0x" and "+" prefixed chunk size.
  • Falcon accepts 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. Note that while these issues were reproduced in Falcon (the server), the issue is with protocol-http1 which implements the HTTP/1 protocol parser. We have not yet been advised of any real world exploit or practical attack.

Patches

Fixed in protocol-http1 v0.15.1+.

Workarounds

None.

References

https://github.com/socketry/protocol-http1/pull/20

References

Affected packages

RubyGems / protocol-http1

Package

Name
protocol-http1
Purl
pkg:gem/protocol-http1

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0The exact introduced commit is unknown
Fixed
0.15.1

Affected versions

0.*

0.1.0
0.2.0
0.3.0
0.4.0
0.4.1
0.5.0
0.6.0
0.7.0
0.8.0
0.8.1
0.8.2
0.8.3
0.9.0
0.10.0
0.10.1
0.10.2
0.10.3
0.11.0
0.11.1
0.12.0
0.13.0
0.13.1
0.13.2
0.14.0
0.14.1
0.14.2
0.14.3
0.14.4
0.14.6
0.15.0