CVE-2009-5011: Pyftpdlib Remote Code Execution Vulnerability
MODERATECVE-2009-5011 is a MODERATE remote code execution vulnerability (CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')) affecting Pyftpdlib libraries in the PyPI ecosystem. The issue involves concurrent execution using shared resource with improper synchronization ('race condition') in pyftpdlib. Remediation is available by upgrading affected packages to version 0.5.2.
CVE-2009-5011 at a Glance
How to Fix CVE-2009-5011
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-5011, 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-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition'), where the product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently. 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-5011 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-5011?
Which Pyftpdlib versions are affected?
What version fixes CVE-2009-5011?
Is pyftpdlib affected?
What CWE is associated with CVE-2009-5011?
How can I check PyPI dependencies for CVE-2009-5011?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-62xg-239j-vxg7",
"modified" : "2024-10-15T16:14:02Z",
"published" : "2022-05-02T04:00:27Z",
"aliases" : [ "CVE-2009-5011" ],
"summary" : "Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') in pyftpdlib",
"details" : "Race condition in the FTPHandler class in ftpserver.py in pyftpdlib before 0.5.2 allows remote attackers to cause a denial of service (daemon outage) by establishing and then immediately closing a TCP connection, leading to the getpeername function having an ENOTCONN error, a different vulnerability than CVE-2010-3494.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/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-5011"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/giampaolo/pyftpdlib"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/pyftpdlib/PYSEC-2010-8.yaml"
}, {
"type" : "WEB",
"url" : "http://code.google.com/p/pyftpdlib/issues/detail?id=100"
}, {
"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=543"
}, {
"type" : "WEB",
"url" : "http://code.google.com/p/pyftpdlib/source/diff?spec=svn543&r=543&format=side&path=/trunk/pyftpdlib/ftpserver.py"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-362" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-06-17T22:28:38Z",
"nvd_published_at" : "2010-10-19T20:00:00Z"
}
}