{"id":"CVE-2023-22466","aliases":["CVE-2023-22466","GHSA-7rrj-xr53-82p7","RUSTSEC-2023-0001"],"related":[],"kind":"vulnerability","state":"published","title":"Tokio's reject_remote_clients configuration may get dropped when creating a Windows named pipe","summary":"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`.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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`.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nWhen 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`.\n\nRemote clients may only access the named pipe if the named pipe's associated path is accessible via a publically shared folder (SMB).\n\n### Patches\n\nThe following versions have been patched:\n* 1.23.1\n* 1.20.3\n* 1.18.4\n\nThe fix will also be present in all releases starting from version 1.24.0.\n\nNamed pipes were introduced to Tokio in version 1.7.0, so releases older than 1.7.0 are not affected.\n\n### Workarounds\n\nEnsure that `pipe_mode` is set **first** after initializing a `ServerOptions`. For example:\n\n```rust\nlet mut opts = ServerOptions::new();\nopts.pipe_mode(PipeMode::Message);\nopts.reject_remote_clients(true);\n```\n\n### References\n\nhttps://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-createnamedpipea#pipe_reject_remote_clients","format":"markdown","source":"ghsa"},{"lang":"en","text":"On Windows, configuring a named pipe server with [pipe_mode] will force [ServerOptions]::[reject_remote_clients] as `false`.\n\nThis drops any intended explicit configuration for the [reject_remote_clients] that may have been set as `true` previously.\n\nThe default setting of [reject_remote_clients] is normally `true` meaning the default is also overridden as `false`.\n\n## Workarounds\n\nEnsure that [pipe_mode] is set first after initializing a [ServerOptions]. For example:\n\n```rust\nlet mut opts = ServerOptions::new();\nopts.pipe_mode(PipeMode::Message);\nopts.reject_remote_clients(true);\n```\n\n[ServerOptions]: https://docs.rs/tokio/latest/tokio/net/windows/named_pipe/struct.ServerOptions.html\n[pipe_mode]: https://docs.rs/tokio/latest/tokio/net/windows/named_pipe/struct.ServerOptions.html#method.pipe_mode\n[reject_remote_clients]: https://docs.rs/tokio/latest/tokio/net/windows/named_pipe/struct.ServerOptions.html#method.reject_remote_clients","format":"markdown","source":"rustsec"},{"lang":"es","text":"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`.","source":"nvd"}],"published":"2023-01-04T12:00:00.000Z","modified":"2026-10-12T18:00:06.115Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:L","score":5.4,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:L","score":5.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:L","score":5.4,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"}],"cwes":["CWE-665"],"affected":[{"ranges":[{"version":">= 1.7.0, < 1.18.4","status":"affected"},{"version":">= 1.19.0, < 1.20.3","status":"affected"},{"version":">= 1.21.0, < 1.23.1","status":"affected"}],"vendor":"tokio-rs","product":"tokio","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"1.7.0","status":"affected","fixed":"1.18.4"}],"ecosystem":"crates.io","package":"tokio","purl":"pkg:cargo/tokio","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"1.19.0","status":"affected","fixed":"1.20.3"}],"ecosystem":"crates.io","package":"tokio","purl":"pkg:cargo/tokio","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"1.21.0","status":"affected","fixed":"1.23.1"}],"ecosystem":"crates.io","package":"tokio","purl":"pkg:cargo/tokio","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"1.7.0","status":"affected","fixed":"1.18.4"},{"type":"semver","introduced":"1.19.0","status":"affected","fixed":"1.20.3"},{"type":"semver","introduced":"1.21.0","status":"affected","fixed":"1.23.1"}],"ecosystem":"crates.io","package":"tokio","purl":"pkg:cargo/tokio","source":"rustsec"},{"ranges":[{"status":"affected","introduced":"1.7.0","fixed":"1.18.4"},{"status":"affected","introduced":"1.19.0","fixed":"1.20.3"},{"status":"affected","introduced":"1.21.0","fixed":"1.23.1"}],"vendor":"tokio","product":"tokio","cpe":"cpe:2.3:a:tokio:tokio:*:*:*:*:*:rust:*:*","source":"nvd"}],"references":[{"url":"https://github.com/tokio-rs/tokio/security/advisories/GHSA-7rrj-xr53-82p7","tags":["mitigation","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/tokio-rs/tokio/pull/5336","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://github.com/tokio-rs/tokio/releases/tag/tokio-1.23.1","tags":["release-notes","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-createnamedpipea#pipe_reject_remote_clients","tags":["technical-description","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-22466","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/tokio-rs/tokio","tags":["package"],"sources":["ghsa"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2023-0001.html","tags":["advisory","web"],"sources":["ghsa","rustsec"]},{"url":"https://crates.io/crates/tokio","tags":["package"],"sources":["rustsec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-03-10T21:00:36.854Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-22466","url":"https://www.cve.org/CVERecord?id=CVE-2023-22466","licence":"CVE Terms of Use","modified":"2025-03-10T21:32:32.950Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-7rrj-xr53-82p7","url":"https://github.com/advisories/GHSA-7rrj-xr53-82p7","licence":"CC-BY-4.0","modified":"2026-09-10T03:49:51.032Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2023-0001","url":"https://rustsec.org/advisories/RUSTSEC-2023-0001.html","licence":"CC0-1.0","modified":"2026-10-12T18:00:06.115Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-22466","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-22466","licence":"Public domain","modified":"2026-06-17T05:35:30.943Z"}],"updatedAt":"2026-11-25T22:58:21.483Z","epss":{"score":0.00612,"percentile":0.50682,"date":"2026-12-01T12:00:22.000Z"}}