{"id":"CVE-2021-42343","aliases":["CVE-2021-42343","GHSA-hwqr-f3v9-hwxr","GHSA-j8fq-86c5-5v2r","PYSEC-2021-387","PYSEC-2021-871","PYSEC-2021-872"],"related":[],"kind":"vulnerability","state":"published","title":"Workers for local Dask clusters mistakenly listened on public interfaces","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"Versions of `distributed` earlier than `2021.10.0` had a potential security vulnerability relating to single-machine Dask clusters.\n\nClusters 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 AND running on a machine that has these ports exposed could be used by a sophisticated attacker to enable remote code execution. Users running on machines with standard firewalls in place, or using clusters created via cluster objects other than `LocalCluster` (e.g. `dask_kubernetes.KubeCluster`) should not be affected. This vulnerability is documented in CVE-2021-42343, and was fixed in version `2021.10.0` (PR #5427).","format":"markdown","source":"ghsa"},{"lang":"en","text":"## Duplicate Advisory\nThis advisory has been withdrawn because it is a duplicate of GHSA-hwqr-f3v9-hwxr. This link is maintained to preserve external references.\n\n## Original Description\nAn issue was discovered in Dask (aka python-dask) through 2021.09.1. 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Se ha descubierto un problema en el paquete distribuido Dask antes de la versión 2021.10.0 para Python. Los clústeres Dask de una sola máquina iniciados con dask.distributed.LocalCluster o dask.distributed.Client (que utiliza por defecto LocalCluster) configuraban por error sus respectivos Dask workers para escuchar en interfaces externas (normalmente con un puerto alto seleccionado al azar) en lugar de hacerlo sólo en localhost. Un cluster Dask creado con este método (cuando se ejecuta en una máquina que tiene un puerto aplicable expuesto) podría ser utilizado por un atacante sofisticado para lograr la ejecución remota de código","source":"nvd"},{"lang":"en","text":"An issue was discovered in Dask (aka python-dask) through 2021.09.1. 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.","format":"markdown","source":"pysec"},{"lang":"en","text":"Withdrawn as duplicate of PYSEC-2021-871. 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.","format":"markdown","source":"pysec"}],"published":"2021-10-26T10:23:26.000Z","modified":"2026-07-09T16:56:37.896Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:P/I:P/A:P","score":6.8,"rating":"MEDIUM"}],"cwes":["CWE-668"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2021.10.0"}],"ecosystem":"PyPI","package":"distributed","purl":"pkg:pypi/distributed","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2021.10.0"}],"ecosystem":"PyPI","package":"dask","purl":"pkg:pypi/dask","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2021.10.0"}],"vendor":"anaconda","product":"dask","cpe":"cpe:2.3:a:anaconda:dask:*:*:*:*:*:python:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2021.10.0"}],"ecosystem":"PyPI","package":"dask","purl":"pkg:pypi/dask","source":"pysec"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2021.10.0"}],"ecosystem":"PyPI","package":"distributed","purl":"pkg:pypi/distributed","source":"pysec"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2021.10.0"}],"ecosystem":"PyPI","package":"distributed","purl":"pkg:pypi/distributed","source":"pysec"}],"references":[{"url":"https://docs.dask.org/en/latest/changelog.html","tags":["release-notes","vendor-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/dask/dask/tags","tags":["third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/dask/distributed/security/advisories/GHSA-hwqr-f3v9-hwxr","tags":["advisory","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-42343","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/dask/distributed/pull/5427","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/dask/distributed/commit/afce4be8e05fb180e50a9d9e38465f1a82295e1b","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/dask/distributed","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/distributed/PYSEC-2021-871.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/distributed/PYSEC-2021-872.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-j8fq-86c5-5v2r","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/dask/PYSEC-2021-387.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-hwqr-f3v9-hwxr","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-42343","url":"https://www.cve.org/CVERecord?id=CVE-2021-42343","licence":"CVE Terms of Use","modified":"2024-08-04T03:30:38.314Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-hwqr-f3v9-hwxr","url":"https://github.com/advisories/GHSA-hwqr-f3v9-hwxr","licence":"CC-BY-4.0","modified":"2026-07-09T16:56:37.896Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-j8fq-86c5-5v2r","url":"https://github.com/advisories/GHSA-j8fq-86c5-5v2r","licence":"CC-BY-4.0","modified":"2026-07-09T16:56:37.896Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-42343","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-42343","licence":"Public domain","modified":"2026-06-17T04:09:40.847Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2021-387","url":"https://osv.dev/vulnerability/PYSEC-2021-387","licence":"CC-BY-4.0","modified":"2026-07-09T16:56:37.896Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2021-871","url":"https://osv.dev/vulnerability/PYSEC-2021-871","licence":"CC-BY-4.0","modified":"2026-07-09T16:56:37.896Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2021-872","url":"https://osv.dev/vulnerability/PYSEC-2021-872","licence":"CC-BY-4.0","modified":"2026-07-09T16:45:04.875Z"}],"updatedAt":"2026-11-25T22:58:05.200Z","epss":{"score":0.02995,"percentile":0.87704,"date":"2026-12-01T12:00:22.000Z"}}