5.4medium
Tokio's reject_remote_clients configuration may get dropped when creating a Windows named pipe
- Severity
- 5.4medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.61% (higher than 50% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-7rrj-xr53-82p7RUSTSEC-2023-0001
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`.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| tokio-rs tokio | >= 1.7.0, < 1.18.4, >= 1.19.0, < 1.20.3, >= 1.21.0, < 1.23.1 | CVE List |
| tokio (crates.io) | from 1.7.0 before 1.18.4, from 1.19.0 before 1.20.3, from 1.21.0 before 1.23.1 | GitHub Advisory Database, RustSec Advisory Database |
| tokio tokio | from 1.7.0 before 1.18.4, from 1.19.0 before 1.20.3, from 1.21.0 before 1.23.1 | NVD |
All scores
| GitHub_M | 5.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:L |
| GitHub | 5.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:L |
| NVD | 5.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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`.
GitHub Advisory Database
Impact
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. This also applies if reject_remote_clients is not explicitly set as this is the default configuration and is cleared by calling pipe_mode.
Remote clients may only access the named pipe if the named pipe's associated path is accessible via a publically shared folder (SMB).
Patches
The following versions have been patched:
- 1.23.1
- 1.20.3
- 1.18.4
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.
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
RustSec Advisory Database
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);
NVD (es)
Tokio es un runtime para escribir aplicaciones con Rust. A partir de la versión 1.7.0 y anteriores a las versiones 1.18.4, 1.20.3 y 1.23.1, al configurar un servidor de canalización con nombre de Windows, configurar `pipe_mode` restablecerá `reject_remote_clients` a `false`. Si la aplicación ha configurado previamente `reject_remote_clients` en `true`, esto efectivamente deshace la configuración. Los clientes remotos solo pueden acceder a la canalización con nombre si se puede acceder a la ruta asociada a la canalización con nombre a través de una carpeta compartida públicamente (SMB). Se han parcheado las versiones 1.23.1, 1.20.3 y 1.18.4. La solución también estará presente en todas las versiones a partir de la versión 1.24.0. Las canalizaciones con nombre se introdujeron en Tokio en la versión 1.7.0, por lo que las versiones anteriores a 1.7.0 no se ven afectadas. Como workaround, asegúrese de que `pipe_mode` esté configurado primero después de inicializar `ServerOptions`.
References
| https://github.com/tokio-rs/tokio/security/advisories/GHSA-7rrj-xr53-82p7 | mitigation, third-party-advisory, web | |
| https://github.com/tokio-rs/tokio/pull/5336 | patch, third-party-advisory, web | |
| https://github.com/tokio-rs/tokio/releases/tag/tokio-1.23.1 | release-notes, third-party-advisory, web | |
| https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-createnamedpipea#pipe_reject_remote_clients | technical-description, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2023-22466 | advisory | |
| https://github.com/tokio-rs/tokio | package | |
| https://rustsec.org/advisories/RUSTSEC-2023-0001.html | advisory, web | |
| https://crates.io/crates/tokio | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-22466 changed 2025-03-10 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-7rrj-xr53-82p7 changed 2026-09-10 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2023-0001 changed 2026-10-12 | CC0-1.0 |
| NVD | CVE-2023-22466 changed 2026-06-17 | Public domain |