Miggo Logo

CVE-2009-5011: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') in pyftpdlib

4.3

CVSS Score

Basic Information

EPSS Score
0.62164%
Published
5/2/2022
Updated
10/15/2024
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
AV:N/AC:M/Au:N/C:N/I:N/A:P
Package NameEcosystemVulnerable VersionsFirst Patched Version
pyftpdlibpip<= 0.5.10.5.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability traceback shows the crash occurs at FTPHandler initialization when calling getpeername(). The race condition exists between connection acceptance and peer verification - if a client disconnects immediately after connecting but before getpeername() executes, the socket becomes invalid. The vulnerable code lacks try/except handling around getpeername() to gracefully handle this transient state, leading to unhandled exceptions that crash the server instance. The function location matches all vulnerability descriptions and issue reports.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

R*** *on*ition in t** *TP**n*l*r *l*ss in *tps*rv*r.py in py*tp*li* ***or* *.*.* *llows r*mot* *tt**k*rs to **us* * **ni*l o* s*rvi** (***mon out***) *y *st**lis*in* *n* t**n imm**i*t*ly *losin* * T*P *onn**tion, l***in* to t** **tp**rn*m* *un*tion *

Reasoning

T** vuln*r**ility tr******k s*ows t** *r*s* o**urs *t `*TP**n*l*r` initi*liz*tion w**n **llin* `**tp**rn*m*()`. T** r*** *on*ition *xists **tw**n *onn**tion ****pt*n** *n* p**r v*ri*i**tion - i* * *li*nt *is*onn**ts imm**i*t*ly **t*r *onn**tin* *ut *