CVE-2021-42343 Workers for local Dask clusters mistakenly listened on public interfaces

Critical 9.8 Published Updated

Dask LocalCluster workers incorrectly listen on external interfaces, allowing remote attackers to achieve code execution on exposed ports.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-42343?

CVE-2021-42343 is a critical vulnerability in n/a, published on 26 Oct 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

An issue was discovered in the Dask distributed package before 2021.10.0 for Python. Single machine Dask clusters started with dask.distributed.LocalCluster or dask.distributed.Client (which defaults to using LocalCluster) would mistakenly configure their respective Dask workers to listen on external interfaces (typically with a randomly selected high port) rather than only on localhost. A Dask cluster created using this method (when running on a machine that has an applicable port exposed) could be used by a sophisticated attacker to achieve remote code execution.

Which versions are affected by CVE-2021-42343?

6 open source packages ship an affected version, including dask and distributed. It affects 1 product.

PackageAffectedFixed in
dask PyPIAll versions2021.10.0
dask PyPIAll versions2021.10.0
dask PyPIAll versions2021.10.0
distributed PyPIAll versions2021.10.0
distributed PyPIAll versions2021.10.0
distributed PyPIAll versions2021.10.0
Linux distribution packages (3)
python-distributed openSUSE:TumbleweedAll versions2022.1.0-1.1
python-distributed openSUSE:TumbleweedAll versions2024.4.2-1.1
python-distributed openSUSE:TumbleweedAll versions2026.6.0-1.1

Products include Anaconda Dask.

How do I fix CVE-2021-42343?

Upgrade dask to 2021.10.0 or later.

Is CVE-2021-42343 being exploited?

There is no known exploitation of CVE-2021-42343 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2021-42343, GHSA-hwqr-f3v9-hwxr, GHSA-j8fq-86c5-5v2r, PYSEC-2021-387, PYSEC-2021-871, UBUNTU-CVE-2021-42343 and 3 more.

Is CVE-2021-42343 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free