Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLXBtdzQtamd4eC1wY3E5

File System Bounds Escape

Impact

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.

Background

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.

Screen Shot 2020-12-15 at 6 42 52 PM

Patches

None at the moment.

Workarounds

There are no workarounds for windows servers. Hosting the server on a different OS mitigates the issue.

References

Issues:
https://github.com/autovance/ftp-srv/issues/167
https://github.com/autovance/ftp-srv/issues/225

For more information

If you have any questions or comments about this advisory:
Open an issue at https://github.com/autovance/ftp-srv.
Please email us directly; [email protected].

Permalink: https://github.com/advisories/GHSA-pmw4-jgxx-pcq9
JSON: https://advisories.ecosyste.ms/api/v1/advisories/MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLXBtdzQtamd4eC1wY3E5
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: almost 4 years ago
Updated: almost 2 years ago


Identifiers: GHSA-pmw4-jgxx-pcq9, CVE-2020-26299
References: Repository: https://github.com/autovance/ftp-srv
Blast Radius: 0.0

Affected Packages

npm:ftp-srv
Dependent packages: 53
Dependent repositories: 102
Downloads: 20,084 last month
Affected Version Ranges: < 4.4.0
Fixed in: 4.4.0
All affected versions: 0.0.0, 1.0.0, 2.0.0, 2.0.1, 2.0.2, 2.1.0, 2.2.0, 2.2.1, 2.3.0, 2.3.1, 2.4.0, 2.5.0, 2.6.0, 2.7.0, 2.7.1, 2.7.2, 2.7.3, 2.8.0, 2.9.0, 2.9.1, 2.9.2, 2.10.0, 2.10.1, 2.11.0, 2.11.1, 2.11.2, 2.11.3, 2.11.4, 2.12.0, 2.13.0, 2.13.1, 2.13.2, 2.13.3, 2.14.0, 2.15.0, 2.16.0, 2.16.1, 2.16.2, 2.17.0, 2.18.0, 2.19.0, 2.19.1, 2.19.2, 2.19.3, 2.19.4, 2.19.5, 2.19.6, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.1.0, 3.1.1, 3.1.2, 4.0.0, 4.0.1, 4.1.0, 4.1.1, 4.2.0, 4.3.0, 4.3.1, 4.3.2, 4.3.3, 4.3.4
All unaffected versions: 4.4.0, 4.5.0, 4.6.0, 4.6.1, 4.6.2, 4.6.3