CVE-2009-5013: Pyftpdlib Remote Code Execution Vulnerability

MODERATE
Advisory Identifier: GHSA-8gv6-x88p-3f6h
CWE-400
Published
Advisory Summary

CVE-2009-5013 is a MODERATE remote code execution vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Pyftpdlib libraries in the PyPI ecosystem. The issue involves uncontrolled resource consumption in pyftpdlib. Remediation is available by upgrading affected packages to version 0.5.2.

CVE-2009-5013 at a Glance

CVE Identifier CVE-2009-5013
GHSA Identifier GHSA-8gv6-x88p-3f6h
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Pyftpdlib
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2009-5013

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.

pyftpdlib fixed: 0.5.2
pip install pyftpdlib>=0.5.2
Verify Direct and Transitive Dependencies

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-5013, 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. 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

Memory leak in the on_dtp_close function in ftpserver.py in pyftpdlib before 0.5.2 allows remote authenticated users to cause a denial of service (memory consumption) by sending a QUIT command during a data transfer.

CVE-2009-5013 Affected Pyftpdlib Versions

1 component(s)
Fixed Versions:
0.5.2
Product / Package Ecosystem Affected Versions Fixed Version
pyftpdlib
PyPI
< 0.5.2
0.5.2

References

Frequently Asked Questions

What is CVE-2009-5013?
CVE-2009-5013 is a security vulnerability in Pyftpdlib involving Uncontrolled Resource Consumption in pyftpdlib under CWE-400: Uncontrolled Resource Consumption.
Which Pyftpdlib versions are affected?
Affected versions include releases prior to 0.5.2 across affected packages: pyftpdlib.
What version fixes CVE-2009-5013?
Upgrading to 0.5.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pyftpdlib affected?
Yes, pyftpdlib is affected in releases prior to 0.5.2. Upgrade your dependency to 0.5.2 or later.
What CWE is associated with CVE-2009-5013?
CVE-2009-5013 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check PyPI dependencies for CVE-2009-5013?
Run the dependency tree command: 'pip show pyftpdlib'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8gv6-x88p-3f6h",
  "modified" : "2024-10-14T15:35:18Z",
  "published" : "2022-05-02T04:00:27Z",
  "aliases" : [ "CVE-2009-5013" ],
  "summary" : "Uncontrolled Resource Consumption in pyftpdlib",
  "details" : "Memory leak in the on_dtp_close function in ftpserver.py in pyftpdlib before 0.5.2 allows remote authenticated users to cause a denial of service (memory consumption) by sending a QUIT command during a data transfer.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:H/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/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-5013"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/giampaolo/pyftpdlib"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/pyftpdlib/PYSEC-2010-10.yaml"
  }, {
    "type" : "WEB",
    "url" : "http://code.google.com/p/pyftpdlib/issues/detail?id=119"
  }, {
    "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=615"
  }, {
    "type" : "WEB",
    "url" : "http://code.google.com/p/pyftpdlib/source/diff?spec=svn615&r=615&format=side&path=/trunk/pyftpdlib/ftpserver.py"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-06-17T22:29:47Z",
    "nvd_published_at" : "2010-10-19T20:00:00Z"
  }
}