CVE-2023-38697: Protocol http1 Protocol-http1 HTTP Request/Response Smuggling Vulnerability Vulnerability
MODERATECVE-2023-38697 is a MODERATE (CVSS 5.8) protocol-http1 http request/response smuggling vulnerability vulnerability (CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')) affecting Protocol http1 libraries in the RubyGems ecosystem. The issue involves protocol-http1 http request/response smuggling vulnerability. Remediation is available by upgrading affected packages to version 0.15.1.
CVE-2023-38697 at a Glance
Security Impact
CVSS: 5.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N).
How to Fix CVE-2023-38697
To remediate this vulnerability, upgrade all affected Protocol http1 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade protocol-http1 to 0.15.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for protocol-http1
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-38697, inspect your project dependencies for Protocol http1:
inspect dependencies for protocol-http1
Analyze the terminal output to locate any version of Protocol http1 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.15.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling'), where the product acts as an intermediary http agent (such as a proxy or firewall) in the data flow between two entities such as a client and server, but it does not interpret malformed http requests or responses in ways that are consistent with how the messages will be processed by those entities that are at the ultimate destination. In Protocol http1, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-38697 Affected Protocol http1 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
protocol-http1
|
RubyGems |
< 0.15.1
|
0.15.1
|
References
Frequently Asked Questions
What is CVE-2023-38697?
Which Protocol http1 versions are affected?
What version fixes CVE-2023-38697?
Is protocol-http1 affected?
What is the CVSS score of CVE-2023-38697?
What CWE is associated with CVE-2023-38697?
How can I check RubyGems dependencies for CVE-2023-38697?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6jwc-qr2q-7xwj",
"modified" : "2023-08-10T22:16:47Z",
"published" : "2023-08-03T16:36:34Z",
"aliases" : [ "CVE-2023-38697" ],
"summary" : "protocol-http1 HTTP Request/Response Smuggling vulnerability",
"details" : "### Impact\n\n[RFC 9112 Section 7.1](https://www.rfc-editor.org/rfc/rfc9112#name-chunked-transfer-coding) defined the format of chunk size, chunk data and chunk extension (detailed ABNF is in Appendix section).\n\nIn summary:\n\n- The value of Content-Length header should be a string of 0-9 digits.\n- The chunk size should be a string of hex digits and should split from chunk data using CRLF.\n- The chunk extension shouldn't contain any invisible character.\n\nHowever, we found that Falcon has following behaviors while disobey the corresponding RFCs.\n\n- Falcon accepts Content-Length header values that have \"+\" prefix.\n- Falcon accepts Content-Length header values that written in hexadecimal with \"0x\" prefix.\n- Falcon accepts \"0x\" and \"+\" prefixed chunk size.\n- Falcon accepts LF in chunk extension.\n\nThis 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.\n\n### Patches\n\nFixed in `protocol-http1` v0.15.1+.\n\n### Workarounds\n\nNone.\n\n### References\n\nhttps://github.com/socketry/protocol-http1/pull/20",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "protocol-http1"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.15.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/socketry/protocol-http1/security/advisories/GHSA-6jwc-qr2q-7xwj"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-38697"
}, {
"type" : "WEB",
"url" : "https://github.com/socketry/protocol-http1/pull/20"
}, {
"type" : "WEB",
"url" : "https://github.com/socketry/protocol-http1/commit/e11fc164fd2b36f7b7e785e69fa8859eb06bcedd"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/protocol-http1/CVE-2023-38697.yml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/socketry/protocol-http1"
}, {
"type" : "WEB",
"url" : "https://www.rfc-editor.org/rfc/rfc9112#name-chunked-transfer-coding"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-444" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-08-03T16:36:34Z",
"nvd_published_at" : "2023-08-04T18:15:15Z"
}
}