Skip to content

protocol-http1 HTTP Request/Response Smuggling vulnerability

Moderate severity GitHub Reviewed Published Aug 2, 2023 in socketry/protocol-http1 • Updated Nov 12, 2023

Package

bundler protocol-http1 (RubyGems)

Affected versions

< 0.15.1

Patched versions

0.15.1

Description

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

socketry/protocol-http1#20

References

@ioquatix ioquatix published to socketry/protocol-http1 Aug 2, 2023
Published to the GitHub Advisory Database Aug 3, 2023
Reviewed Aug 3, 2023
Published by the National Vulnerability Database Aug 4, 2023
Last updated Nov 12, 2023

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Changed
Confidentiality
None
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N

EPSS score

0.111%
(45th percentile)

Weaknesses

CVE ID

CVE-2023-38697

GHSA ID

GHSA-6jwc-qr2q-7xwj

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.