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.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

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

magic-wormhole (>= 0.21.0, < 0.23.0)

Security releases

magic-wormhole → 0.23.0 (pip)

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

  1. 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.
  2. Which versions of magic-wormhole are affected by CVE-2026-32116? magic-wormhole (pip) versions >= 0.21.0, < 0.23.0 is affected.
  3. Is there a fix for CVE-2026-32116? Yes. CVE-2026-32116 is fixed in 0.23.0. Upgrade to this version or later.
  4. 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
  5. 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.
  6. How do I fix CVE-2026-32116? Upgrade magic-wormhole to 0.23.0 or later.

Other vulnerabilities in magic-wormhole

Stop the waste.
Protect your environment with Kodem.