CVE-2026-32116
JSON

8.2high

Magic Wormhole: "wormhole receive" allows arbitrary local file overwrite

Severity
8.2high CVSS:4.0 by GitHub_M
Exploit likelihood
0.40% (higher than 36% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-4g4c-mfqg-pj8rPYSEC-2026-2615

Description

Magic Wormhole makes it possible to get arbitrary-sized files and directories from one computer to another. From 0.21.0 to before 0.23.0, receiving a file (wormhole receive) from a malicious party could result in overwriting critical local files, including ~/.ssh/authorized_keys and .bashrc. This could be used to compromise the receiver's computer. Only the sender of the file (the party who runs wormhole send) can mount the attack. Other parties (including the transit/relay servers) are excluded by the wormhole protocol. This vulnerability is fixed in 0.23.0.

Affected

Product or packageVersionsReported by
magic-wormhole magic-wormhole>= 0.21.0, < 0.23.0CVE List
magic-wormhole (PyPI)from 0.21.0 before 0.23.0GitHub Advisory Database, PyPA Advisory Database
magic-wormhole_project magic_wormholefrom 0.21.0 before 0.23.0NVD

All scores

GitHub_M8.2high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:N/VI:H/VA:N/SC:N/SI:H/SA:N
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:N/VI:H/VA:N/SC:N/SI:H/SA:N
NVD8.1high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
PyPA Advisory DatabaseNot scored CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:N/VI:H/VA:N/SC:N/SI:H/SA:N

Classification

CWE-22

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Magic Wormhole makes it possible to get arbitrary-sized files and directories from one computer to another. From 0.21.0 to before 0.23.0, receiving a file (wormhole receive) from a malicious party could result in overwriting critical local files, including ~/.ssh/authorized_keys and .bashrc. This could be used to compromise the receiver's computer. Only the sender of the file (the party who runs wormhole send) can mount the attack. Other parties (including the transit/relay servers) are excluded by the wormhole protocol. This vulnerability is fixed in 0.23.0.

GitHub Advisory Database
Impact

What kind of vulnerability is it? Who is impacted?

Receiving a file (wormhole receive) from a malicious party could result in overwriting critical local files, including ~/.ssh/authorized_keys and .bashrc. This could be used to compromise the receiver's computer.

Only the sender of the file (the party who runs wormhole send) can mount the attack. Other parties (including the transit/relay servers) are excluded by the wormhole protocol.

Patches

Has the problem been patched? What versions should users upgrade to?

The bug has been fixed in magic-wormhole 0.23.0. All users should upgrade to this version.

The vulnerability first surfaced in the 0.21.0 release on 23-Oct-2025.

Workarounds

Is there a way for users to fix or remediate the vulnerability without upgrading?

As a workaround, the receiver can override the sender's filename with the --output or -o option. For example: wormhole receive -o shopping-list.txt will write the file to shopping-list.txt in the local directory, regardless of what the sender tries to do. To be effective, this option must be added to every invocation of wormhole receive / wormhole rx.

References

Are there any links users can visit to find out more?

Incoming file transfer requests include a filename, used to decide where the file contents will be written. Well-behaving senders compute this from the basename() of the sent file (which discards all but the last segment of the path). To guard against malicious senders, the receiver also applies basename() to the incoming filename. During refactoring in version 0.21.0, this receiver-side check was accidentally dropped. The check was restored in version 0.23.0 along with a unit test.

Many thanks to Ian McKenzie (@ikmckenz) for spotting the bug and reaching out with a fix.

NVD (es)

Magic Wormhole permite obtener archivos y directorios de tamaño arbitrario de un ordenador a otro. Desde la versión 0.21.0 hasta antes de la 0.23.0, recibir un archivo (wormhole receive) de un actor malicioso podría resultar en la sobrescritura de archivos locales críticos, incluyendo ~/.ssh/authorized_keys y .bashrc. Esto podría utilizarse para comprometer el ordenador del receptor. Solo el remitente del archivo (el actor que ejecuta wormhole send) puede llevar a cabo el ataque. Otras partes (incluyendo los servidores de tránsito/retransmisión) quedan excluidas por el protocolo wormhole. Esta vulnerabilidad está corregida en la versión 0.23.0.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-32116 changed 2026-03-13CVE Terms of Use
GitHub Advisory DatabaseGHSA-4g4c-mfqg-pj8r changed 2026-07-13CC-BY-4.0
NVDCVE-2026-32116 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2026-2615 changed 2026-07-13CC-BY-4.0