Improper Input Validation Affecting tokio package, versions >=0.3.0 <1.5.1>=1.6.0 <1.6.3>=1.7.0 <1.7.2>=1.8.0 <1.8.1


Severity

Recommended
0.0
medium
0
10

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

Threat Intelligence

EPSS
0.1% (43rd 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-1316314
  • published9 Jul 2021
  • disclosed7 Jul 2021
  • creditUnknown

Introduced: 7 Jul 2021

CVE-2021-38191  (opens in a new tab)
CWE-20  (opens in a new tab)

How to fix?

Upgrade tokio to version 1.5.1, 1.6.3, 1.7.2, 1.8.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 Input Validation. When aborting a task with JoinHandle::abort, the future is dropped in the thread calling abort if the task is not currently being executed. This is incorrect for tasks spawned on a LocalSet. This can easily result in race conditions as many projects use Rc or RefCell in their Tokio tasks for better performance.

References

CVSS Scores

version 3.1