Improper Initialization Affecting tokio package, versions >=1.7.0 <1.18.4>=1.20.0 <1.20.3>=1.23.0 <1.23.1


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.12% (48th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-RUST-TOKIO-3225079
  • published5 Jan 2023
  • disclosed5 Jan 2023
  • creditmhils

Introduced: 5 Jan 2023

CVE-2023-22466  (opens in a new tab)
CWE-665  (opens in a new tab)

How to fix?

Upgrade tokio to version 1.18.4, 1.20.3, 1.23.1 or higher.

Overview

tokio is an An event-driven, non-blocking I/O platform for writing asynchronous I/O backed applications.

Affected versions of this package are vulnerable to Improper Initialization which results in resetting the value of reject_remote_clients to false by using the function pipe_mode. Exploiting this vulnerability is possible when creating a Windows named pipe.

Workaround

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);

CVSS Scores

version 3.1