CVE-2023-0040: Github.com/swift server/async http client Async HTTP Client Has CRLF Vulnerability
HIGHCVE-2023-0040 is a HIGH (CVSS 7.5) async http client has crlf vulnerability (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')) affecting Github.com/swift server/async http client libraries in the SwiftURL ecosystem. The issue involves async http client has crlf injection vulnerability in http request headers. Remediation is available by upgrading affected packages to version 1.13.2, 1.12.1, 1.9.1, 1.4.1.
CVE-2023-0040 at a Glance
Security Impact
CVSS: 7.5
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:U/C:N/I:H/A:N).
How to Fix CVE-2023-0040
To remediate this vulnerability, upgrade all affected Github.com/swift server/async http client 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 github.com/swift-server/async-http-client to 1.13.2
Upgrade github.com/swift-server/async-http-client to 1.12.1
Upgrade github.com/swift-server/async-http-client to 1.9.1
Upgrade github.com/swift-server/async-http-client to 1.4.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/swift-server/async-http-client
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-0040, inspect your project dependencies for Github.com/swift server/async http client:
inspect dependencies for github.com/swift-server/async-http-client
Analyze the terminal output to locate any version of Github.com/swift server/async http client in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.13.2), 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-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), where the product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. In Github.com/swift server/async http client, 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-0040 Affected Github.com/swift server/async http client Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/swift-server/async-http-client
|
SwiftURL |
≥ 1.13.0
< 1.13.2
|
1.13.2
|
|
github.com/swift-server/async-http-client
|
SwiftURL |
≥ 1.10.0
< 1.12.1
|
1.12.1
|
|
github.com/swift-server/async-http-client
|
SwiftURL |
≥ 1.5.0
< 1.9.1
|
1.9.1
|
|
github.com/swift-server/async-http-client
|
SwiftURL |
< 1.4.1
|
1.4.1
|
References
Frequently Asked Questions
What is CVE-2023-0040?
Which Github.com/swift server/async http client versions are affected?
What version fixes CVE-2023-0040?
Is github.com/swift-server/async-http-client affected?
What is the CVSS score of CVE-2023-0040?
What CWE is associated with CVE-2023-0040?
How can I check SwiftURL dependencies for CVE-2023-0040?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v3r5-pjpm-mwgq",
"modified" : "2023-06-07T15:52:55Z",
"published" : "2023-06-07T15:52:55Z",
"aliases" : [ "CVE-2023-0040" ],
"summary" : "Async HTTP Client has CRLF Injection vulnerability in HTTP request headers",
"details" : "Versions of Async HTTP Client prior to 1.13.2 are vulnerable to a form of targeted request manipulation called CRLF injection. This vulnerability was the result of insufficient validation of HTTP header field values before sending them to the network. Users are vulnerable if they pass untrusted data into HTTP header field values without prior sanitisation. Common use-cases here might be to place usernames from a database into HTTP header fields.\n\nThis vulnerability allows attackers to inject new HTTP header fields, or entirely new requests, into the data stream. This can cause requests to be understood very differently by the remote server than was intended. In general, this is unlikely to result in data disclosure, but it can result in a number of logical errors and other misbehaviours.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "SwiftURL",
"name" : "github.com/swift-server/async-http-client"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.13.0"
}, {
"fixed" : "1.13.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "SwiftURL",
"name" : "github.com/swift-server/async-http-client"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.10.0"
}, {
"fixed" : "1.12.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "SwiftURL",
"name" : "github.com/swift-server/async-http-client"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.5.0"
}, {
"fixed" : "1.9.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "SwiftURL",
"name" : "github.com/swift-server/async-http-client"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.4.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/swift-server/async-http-client/security/advisories/GHSA-v3r5-pjpm-mwgq"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-0040"
}, {
"type" : "WEB",
"url" : "https://github.com/swift-server/async-http-client/commit/7f05a8da46cc2a4ab43218722298b81ac7a08031"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/swift-server/async-http-client"
}, {
"type" : "WEB",
"url" : "https://github.com/swift-server/async-http-client/releases/tag/1.12.1"
}, {
"type" : "WEB",
"url" : "https://github.com/swift-server/async-http-client/releases/tag/1.13.2"
}, {
"type" : "WEB",
"url" : "https://github.com/swift-server/async-http-client/releases/tag/1.4.1"
}, {
"type" : "WEB",
"url" : "https://github.com/swift-server/async-http-client/releases/tag/1.9.1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-74", "CWE-93" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-06-07T15:52:55Z",
"nvd_published_at" : "2023-01-18T19:15:00Z"
}
}