Vulnerability MediumRUSTSEC-2023-0001 · tokio
RUSTSEC-2023-0001: reject_remote_clients Configuration corruption
Short answerA security vulnerability in the tokio crate: reject_remote_clients Configuration corruption. GitHub rates it Medium. Fixed in 1.18.4, 1.20.3, 1.23.1: update to a fixed version.
| Crate | tokio |
|---|---|
| Type | Vulnerability |
| Affected versions | From 1.7.0 before 1.18.4; from 1.19.0 before 1.20.3; from 1.21.0 before 1.23.1. |
| Fixed in | 1.18.4, 1.20.3, 1.23.1 |
| Severity | Medium (GitHub rating) |
| Published | 2023-01-04 |
| Last changed | 2026-10-12 |
| Also known as | CVE-2023-22466, GHSA-7rrj-xr53-82p7 |
What to do
- See which version you have:
cargo tree -i tokio(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p tokio. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for exampletokio = "1.23.1") or update the dependency that pulls it in. - Check again with
cargo audit, or paste your Cargo.lock into our Cargo.toml checker.
Details from the advisory
On Windows, configuring a named pipe server with pipe_mode will force ServerOptions::reject_remote_clients as false.
This drops any intended explicit configuration for the reject_remote_clients that may have been set as true previously.
The default setting of reject_remote_clients is normally true meaning the default is also overridden as false.
Workarounds
Ensure that pipe_mode is set first after initializing a ServerOptions. For example:
let mut opts = ServerOptions::new();
opts.pipe_mode(PipeMode::Message);
opts.reject_remote_clients(true);
References
- Package: crates.io/crates/tokio
- Advisory: rustsec.org/advisories/RUSTSEC-2023-0001.html
- Web: github.com/tokio-rs/tokio/pull/5336
- Web: github.com/tokio-rs/tokio/pull/5336
- Web: learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-createnamedpipea#pipe_reject_remote_clients
From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.
Other advisories for tokio
- VulnerabilityRUSTSEC-2021-0072 · 2021-07-07Task dropped in wrong thread when aborting `LocalSet` task
- VulnerabilityRUSTSEC-2021-0124 · 2021-11-16Data race when sending and receiving after closing a `oneshot` channel
- UnsoundRUSTSEC-2023-0005 · 2023-01-11`tokio::io::ReadHalf<T>::unsplit` is Unsound
- UnsoundRUSTSEC-2025-0023 · 2025-04-07Broadcast channel calls clone in parallel, but does not require `Sync`
- VulnerabilityRUSTSEC-2026-0384 · 2026-10-21Race condition in `tokio::time::Interval` on Tokio v1.54.0
- UnsoundRUSTSEC-2026-0386 · 2026-10-13`AsyncFd::new` and related constructors violate I/O safety
Up next
Same cratetokio: security historyEvery advisory for this crate, and whether it is safe to use today.Read it next →Did this answer your question?