Lucene search

K
rubygemsRubySecRUBY:PROTOCOL-HTTP1-2023-38697
HistoryAug 02, 2023 - 9:00 p.m.

protocol-http1 HTTP Request/Response Smuggling vulnerability

2023-08-0221:00:00
RubySec
github.com
7
rfc 9112
content-length header
chunk size
chunk extension
falcon
desync
http request smuggling
firewall bypassing
protocol-http1
v0.15.1+.

CVSS3

5.8

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

CHANGED

Confidentiality Impact

NONE

Integrity Impact

LOW

Availability Impact

NONE

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

EPSS

0.001

Percentile

45.0%

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

No.

References

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

Affected configurations

Vulners
Node
rubyprotocol-http1Range0.15.1
VendorProductVersionCPE
rubyprotocol-http1*cpe:2.3:a:ruby:protocol-http1:*:*:*:*:*:*:*:*

CVSS3

5.8

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

CHANGED

Confidentiality Impact

NONE

Integrity Impact

LOW

Availability Impact

NONE

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

EPSS

0.001

Percentile

45.0%