Memory Leak Vulnerability in python-pyftpdlib: Denial of Service Risk

python-pyftpdlib Updated 02 Oct 2025

Summary

19/10/2010
N/A
Yes i
Unrated
Not published

CVE-2009-5013: 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. Affects python-pyftpdlib versions < 0.5.2-1. Fixed in 0.5.2-1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

python-pyftpdlib is a popular library for creating FTP servers in Python. It provides a robust framework for handling FTP connections, allowing developers to easily implement file transfer capabilities in their applications. However, prior to version 0.5.2, the library contained a vulnerability that could lead to memory leaks during data transfers, potentially affecting server performance and availability.

Vulnerability Detail

The vulnerability, identified as CVE-2009-5013, arises from a memory leak in the on_dtp_close function within ftpserver.py of pyftpdlib versions before 0.5.2. When a remote authenticated user sends a QUIT command during an active data transfer, the server fails to properly release memory resources, leading to increased memory consumption. This can result in a denial of service, as the server may become unresponsive due to exhausted memory resources.

How To Fix

Minimum fixed version

0.5.2-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-pyftpdlib

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can limit the number of simultaneous connections to your FTP server or monitor active sessions closely to prevent authenticated users from sending QUIT commands during data transfers. Additionally, consider implementing resource monitoring tools to alert you when memory usage approaches critical levels.

Conclusion

The memory leak vulnerability in python-pyftpdlib (CVE-2009-5013) poses a significant risk of denial of service due to excessive memory consumption during data transfers. Upgrading to the fixed version is essential for maintaining server stability and performance. Utilizing tools like Vulert can help in monitoring and identifying vulnerabilities in your applications.

See every vulnerability recorded for python-pyftpdlib →

Share this vulnerability

FAQ

CVE-2009-5013 is a vulnerability in the python-pyftpdlib library that allows remote authenticated users to cause a denial of service by sending a QUIT command during a data transfer, leading to memory leaks.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Simply upload your manifest file like package-lock.json to check for vulnerabilities without needing to install any software.

The primary consequence is a denial of service, where the FTP server may become unresponsive due to excessive memory consumption caused by the memory leak.

Yes, you should upgrade to version 0.5.2-1 or later of python-pyftpdlib to mitigate this vulnerability.

Yes, you can implement resource monitoring tools to keep track of memory usage and set alerts for unusual spikes that may indicate exploitation of this vulnerability.

Related vulnerabilities

Recent vulnerabilities recorded for python-pyftpdlib.

How To Fix

Minimum fixed version

0.5.2-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-pyftpdlib

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback