CVE-2009-5012: Pyftpdlib Improper Access Control Vulnerability
HIGHCVE-2009-5012 is a HIGH improper access control vulnerability (CWE-284: Improper Access Control) affecting Pyftpdlib libraries in the PyPI ecosystem. The issue involves improper access control in pyftpdlib. Remediation is available by upgrading affected packages to version 0.5.2.
CVE-2009-5012 at a Glance
How to Fix CVE-2009-5012
To remediate this vulnerability, upgrade all affected Pyftpdlib 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 pyftpdlib>=0.5.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show pyftpdlib
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2009-5012, inspect your installed packages using pip:
pip show pyftpdlib
Analyze the terminal output to locate any version of Pyftpdlib in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.5.2), your application is affected.
Note: The pip show pyftpdlib command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. In Pyftpdlib, 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-2009-5012 Affected Pyftpdlib Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pyftpdlib
|
PyPI |
< 0.5.2
|
0.5.2
|
References
Frequently Asked Questions
What is CVE-2009-5012?
Which Pyftpdlib versions are affected?
What version fixes CVE-2009-5012?
Is pyftpdlib affected?
What CWE is associated with CVE-2009-5012?
How can I check PyPI dependencies for CVE-2009-5012?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-h4g7-8m7r-87r9",
"modified" : "2024-10-14T16:52:32Z",
"published" : "2022-05-02T04:00:26Z",
"aliases" : [ "CVE-2009-5012" ],
"summary" : "Improper Access Control in pyftpdlib",
"details" : "ftpserver.py in pyftpdlib before 0.5.2 does not require the l permission for the MLST command, which allows remote authenticated users to bypass intended access restrictions and list the root directory via an FTP session.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "pyftpdlib"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.5.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.5.1"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2009-5012"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/giampaolo/pyftpdlib"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/pyftpdlib/PYSEC-2010-9.yaml"
}, {
"type" : "WEB",
"url" : "http://code.google.com/p/pyftpdlib/issues/detail?id=114"
}, {
"type" : "WEB",
"url" : "http://code.google.com/p/pyftpdlib/source/browse/trunk/HISTORY"
}, {
"type" : "WEB",
"url" : "http://code.google.com/p/pyftpdlib/source/detail?r=596"
}, {
"type" : "WEB",
"url" : "http://code.google.com/p/pyftpdlib/source/diff?spec=svn596&r=596&format=side&path=/trunk/pyftpdlib/ftpserver.py"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-284" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-06-17T22:29:32Z",
"nvd_published_at" : "2010-10-19T20:00:00Z"
}
}