CVE-2026-32116: Magic Wormhole "wormhole Receive" Allows Arbitrary Local Vulnerability
HIGHCVE-2026-32116 is a HIGH "wormhole receive" allows arbitrary local vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Magic Wormhole libraries in the PyPI ecosystem. The issue involves "wormhole receive" allows arbitrary local file overwrite. Remediation is available by upgrading affected packages to version 0.23.0.
CVE-2026-32116 at a Glance
How to Fix CVE-2026-32116
To remediate this vulnerability, upgrade all affected Magic Wormhole dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install magic-wormhole>=0.23.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show magic-wormhole
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-32116, inspect your installed packages using pip:
pip show magic-wormhole
Analyze the terminal output to locate any version of Magic Wormhole in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.23.0), your application is affected.
Note: The pip show magic-wormhole command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Magic Wormhole, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-32116 Affected Magic Wormhole Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
magic-wormhole
|
PyPI |
≥ 0.21.0
< 0.23.0
|
0.23.0
|
References
Frequently Asked Questions
What is CVE-2026-32116?
Which Magic Wormhole versions are affected?
What version fixes CVE-2026-32116?
Is magic-wormhole affected?
What CWE is associated with CVE-2026-32116?
How can I check PyPI dependencies for CVE-2026-32116?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4g4c-mfqg-pj8r",
"modified" : "2026-03-13T15:40:20Z",
"published" : "2026-03-13T15:40:20Z",
"aliases" : [ "CVE-2026-32116" ],
"summary" : "Magic Wormhole: \"wormhole receive\" allows arbitrary local file overwrite",
"details" : "### Impact\n_What kind of vulnerability is it? Who is impacted?_\n\nReceiving 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.\n\nOnly 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.\n\n### Patches\n_Has the problem been patched? What versions should users upgrade to?_\n\nThe bug has been fixed in magic-wormhole 0.23.0. All users should upgrade to this version.\n\nThe vulnerability first surfaced in the 0.21.0 release on 23-Oct-2025.\n\n### Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n\nAs 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`.\n\n### References\n_Are there any links users can visit to find out more?_\n\nIncoming 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.\n\nMany thanks to Ian McKenzie (@ikmckenz) for spotting the bug and reaching out with a fix.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:N/VI:H/VA:N/SC:N/SI:H/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "magic-wormhole"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.21.0"
}, {
"fixed" : "0.23.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/magic-wormhole/magic-wormhole/security/advisories/GHSA-4g4c-mfqg-pj8r"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-32116"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/magic-wormhole/magic-wormhole"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-13T15:40:20Z",
"nvd_published_at" : "2026-03-12T18:16:24Z"
}
}