CVE-2020-26299 File System Bounds Escape
Attackers can escape the FTP user's root directory on Windows systems using path traversal commands, allowing unauthorized file access.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2020-26299?
CVE-2020-26299 is a medium-severity path traversal vulnerability in autovance ftp-srv, published on 10 Feb 2021. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
ftp-srv is an open-source FTP server designed to be simple yet configurable. In ftp-srv before version 4.4.0 there is a path-traversal vulnerability. Clients of FTP servers utilizing ftp-srv hosted on Windows machines can escape the FTP user's defined root folder using the expected FTP commands, for example, CWD and UPDR. When windows separators exist within the path (`\`), `path.resolve` leaves the upper pointers intact and allows the user to move beyond the root folder defined for that user. We did not take that into account when creating the path resolve function. The issue is patched in version 4.4.0 (commit 457b859450a37cba10ff3c431eb4aa67771122e3).
Weakness: CWE-22
Which versions are affected by CVE-2020-26299?
2 open source packages ship an affected version, including ftp-srv. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
ftp-srv npm | All versions | 4.4.0 |
ftp-srv npm | All versions | 4.4.0 |
Products include Ftp-Srv Project Ftp-Srv.
How do I fix CVE-2020-26299?
Upgrade ftp-srv to 4.4.0 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2020-26299 being exploited?
There is no known exploitation of CVE-2020-26299 in the wild and no public exploit code.
Other vulnerabilities in autovance ftp-srv
Sources
Also known as GHSA-pmw4-jgxx-pcq9.