CVE-2026-41589: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in charmbracelet wish
Wish is an SSH server with defaults and a collection of middlewares. From version 2.0.0 to before version 2.0.1, the SCP middleware in charm.land/wish/v2 is vulnerable to path traversal attacks. A malicious SCP client can read arbitrary files from the server, write arbitrary files to the server, and create directories outside the configured root directory by sending crafted filenames containing ../ sequences over the SCP protocol. This issue has been patched in version 2.0.1.
AI Analysis
Technical Summary
The SCP middleware in charmbracelet wish versions from 2.0.0 to before 2.0.1 is vulnerable to CWE-22 path traversal. An attacker controlling an SCP client can exploit this by sending specially crafted filenames containing directory traversal sequences (../) to escape the configured root directory. This enables unauthorized reading and writing of arbitrary files and creation of directories outside the restricted path. The issue was addressed and fixed in version 2.0.1 of wish.
Potential Impact
Successful exploitation allows an attacker with SCP client access and at least limited privileges to read sensitive files, write arbitrary files, and create directories outside the intended root directory on the server. This can lead to confidentiality and integrity breaches. The vulnerability does not affect availability. There are no known exploits in the wild at this time.
Mitigation Recommendations
Upgrade charmbracelet wish to version 2.0.1 or later, where this path traversal vulnerability has been patched. Since this is a software vulnerability with an available fixed version, applying the official update is the recommended remediation. Patch status is confirmed by the vendor advisory stating the fix is included in version 2.0.1.
CVE-2026-41589: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in charmbracelet wish
Description
Wish is an SSH server with defaults and a collection of middlewares. From version 2.0.0 to before version 2.0.1, the SCP middleware in charm.land/wish/v2 is vulnerable to path traversal attacks. A malicious SCP client can read arbitrary files from the server, write arbitrary files to the server, and create directories outside the configured root directory by sending crafted filenames containing ../ sequences over the SCP protocol. This issue has been patched in version 2.0.1.
CVSS v3.1
Score 9.6critical
Affected software
pkg:golang/github.com/charmbracelet/wishRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The SCP middleware in charmbracelet wish versions from 2.0.0 to before 2.0.1 is vulnerable to CWE-22 path traversal. An attacker controlling an SCP client can exploit this by sending specially crafted filenames containing directory traversal sequences (../) to escape the configured root directory. This enables unauthorized reading and writing of arbitrary files and creation of directories outside the restricted path. The issue was addressed and fixed in version 2.0.1 of wish.
Potential Impact
Successful exploitation allows an attacker with SCP client access and at least limited privileges to read sensitive files, write arbitrary files, and create directories outside the intended root directory on the server. This can lead to confidentiality and integrity breaches. The vulnerability does not affect availability. There are no known exploits in the wild at this time.
Mitigation Recommendations
Upgrade charmbracelet wish to version 2.0.1 or later, where this path traversal vulnerability has been patched. Since this is a software vulnerability with an available fixed version, applying the official update is the recommended remediation. Patch status is confirmed by the vendor advisory stating the fix is included in version 2.0.1.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-21T14:15:21.960Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69fcadf8cbff5d8610046f7d
Added to database: 05/07/2026, 15:21:28 UTC
Last enriched: 05/07/2026, 15:36:29 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 119
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.