CVE-2023-22466
JSON

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 packageVersionsReported by
tokio-rs tokio>= 1.7.0, < 1.18.4, >= 1.19.0, < 1.20.3, >= 1.21.0, < 1.23.1CVE 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.1GitHub Advisory Database, RustSec Advisory Database
tokio tokiofrom 1.7.0 before 1.18.4, from 1.19.0 before 1.20.3, from 1.21.0 before 1.23.1NVD

All scores

GitHub_M5.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:L
GitHub5.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:L
NVD5.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N

Classification

CWE-665

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

https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-createnamedpipea#pipe_reject_remote_clients

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

Sources

SourceRecordLicence
CVE ListCVE-2023-22466 changed 2025-03-10CVE Terms of Use
GitHub Advisory DatabaseGHSA-7rrj-xr53-82p7 changed 2026-09-10CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2023-0001 changed 2026-10-12CC0-1.0
NVDCVE-2023-22466 changed 2026-06-17Public domain