async-h1
Asynchronous HTTP 1.1 parser.
2.3.4
6.6M downloads/mo
#3899 most downloaded on crates.io
http-rs/async-h1
What this package is like to depend on
Last release 3 years ago
no release in 18 months
Ships unpredictably
gaps range from 2 weeks to 1.9 years
Most releases are documented
notes for 3 of 5 stable releases
17 versions withdrawn
withdrawn after publishing
7 years old
22 releases · first in 2019
0 releases in the last 12 months
see the full history below
Release timeline
22 releases · Jun 2019 to Oct 2023Releases
latest 22-
2.3.410 Oct 2023Nothing published for this version
-
2.3.321 Nov 2021Nothing published for this version
-
2.3.203 Mar 2021 -
2.3.104 Feb 2021Release notes
Open source →Patch release notes for 2.3.1:
- fixes a bug with connection header parsing, addressing a websocket issue with firefox
- no longer depends on default-features for http-types
- internal refactor of testing utility to address a race condition
-
2.3.018 Dec 2020Release notes
Open source →Fix for smuggling vulnerability in async-h1
This release represents a fix for a flaw believed to have been present in all previous versions of async-h1, which have been yanked. This vulnerability affects any web server that uses async-h1 behind a reverse proxy, including all such Tide applications.
The flaw was as follows:
If the server endpoint does not attempt to read the body of a request which is longer than some specific and predictable buffer length, async-h1 will attempt to read a subsequent request from within the body content starting at that offset into the body.
One way to exploit this vulnerability would be for an adversary to craft a request such that the body contains a second request that would not be noticed by a reverse proxy, allowing the http client to forge forwarded/x-forwarded headers on the smuggled request. If an application trusted the authenticity of these headers, it could be misled by the smuggled request.
Another potential concern with this vulnerability is that if a reverse proxy is sending multiple http clients' requests along the same keep-alive connection, it would be possible for the smuggled request to specify a long content-length header and capture another user's request in its body. This content could be captured in a POST request to an endpoint that allows the content to be subsequently retrieved by the adversary.
Semver
We are releasing this as semver-minor in order to make upgrades easier. A survey of reverse dependencies indicated that nearly all users of async-h1 are using
async_h1::server::accept, which is the primary server api of this crate, and which is unchanged by this fix. However, this release does represent a breaking change to the signature ofdecode, which while not the standard entrypoint to async-h1, is still part of our public API. We have made this tradeoff to prioritize the upgrade path for the overwhelming majority of users who only transitively depend on async-h1.Yanking
We have yanked all previous versions of async-h1 from crates.io, as we believe that this vulnerability merits that action. Please contact us with any concerns about this choice.
Additional code in this release
This release also improves async-h1's keepalive handling, in that it now respects
connection: closeheaders. It also includes improvements to the crate's testing tooling in order to reproduce the above bug in our tests.Thanks
We would like to extend our appreciation to @Dirbaio, who identified this issue, patiently walked us through it, and helped explore potential solutions
-
2.2.105 Dec 2020 withdrawnRelease notes
Open source → -
2.2.004 Dec 2020 withdrawnRelease notes
Open source →Bugfixes 🐛
- Fixes the handling of urls that start with multiple slashes, like
http://example.com//double/slashes#153
Features ✨
- Adds support for protocol upgrades, unlocking experimental websockets support #159
- Adds support for client chunked encoding, allowing the streaming of bodies with indeterminate length #158
Internal 🏗️
- Fixes the handling of urls that start with multiple slashes, like
-
2.1.402 Nov 2020 withdrawnRelease notes
Open source →🐛 Bugfix
- For each header from an incoming request, use append instead of insert
-
2.1.317 Oct 2020 withdrawn -
2.1.203 Aug 2020 withdrawnRelease notes
Open source →This patch ensures we always populate the
Request::versionfield when parsing requests.Fixes
- Set request version #131
-
2.1.128 Jul 2020 withdrawnRelease notes
Open source →This patch fixes an issue in the client where we were incorrectly sending the URL fragment (
#fragment) on requests.Fixes
Changes
- Update text on minimum supported Rust version #127
-
2.1.005 Jul 2020 withdrawn -
2.0.205 Jun 2020 withdrawnNothing published for this version
-
2.0.129 May 2020 withdrawnNothing published for this version
-
2.0.022 May 2020 withdrawnNothing published for this version
-
1.1.218 Apr 2020 withdrawnNothing published for this version
-
1.1.118 Apr 2020 withdrawnNothing published for this version
-
1.1.011 Apr 2020 withdrawnNothing published for this version
-
1.0.224 Mar 2020 withdrawnNothing published for this version
-
1.0.115 Mar 2020 withdrawnNothing published for this version
-
1.0.025 Feb 2020 withdrawnNothing published for this version
-
0.0.001 Jun 2019 withdrawnNothing published for this version