Summary
Magic Wormhole: "wormhole receive" allows arbitrary local file overwrite
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.
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.
Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files. Typical impact: unauthorized file read or write outside the intended directory.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
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.
Frequently Asked Questions
- What is CVE-2026-32116? CVE-2026-32116 is a high-severity path traversal vulnerability in magic-wormhole (pip), affecting versions >= 0.21.0, < 0.23.0. It is fixed in 0.23.0. Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files.
- Which versions of magic-wormhole are affected by CVE-2026-32116? magic-wormhole (pip) versions >= 0.21.0, < 0.23.0 is affected.
- Is there a fix for CVE-2026-32116? Yes. CVE-2026-32116 is fixed in 0.23.0. Upgrade to this version or later.
- Is CVE-2026-32116 exploitable, and should I be worried? Whether CVE-2026-32116 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-32116 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-32116? Upgrade
magic-wormholeto 0.23.0 or later.