CVE-2021-40524
Pure-FTPd vulnerability analysis and mitigation

Overview

In Pure-FTPd versions 1.0.23 through 1.0.49, an incorrect max_filesize quota mechanism in the server allows attackers to upload files of unbounded size. This vulnerability was discovered in September 2021 and assigned CVE-2021-40524. The issue occurs because a certain greater-than-zero test does not anticipate an initial -1 value (CVE Mitre).

Technical details

The vulnerability stems from a logic flaw in the quota checking mechanism where the predicate (maxfilesize >= (offt) 0 && (maxfilesize = userquotasize - quota.size) < (offt) 0) never evaluates to true because maxfilesize is initially set to -1. When max_filesize >= (offt) 0 evaluates to false, the subsequent predicate is not evaluated, leaving max_filesize at -1 indefinitely. This results in no overflow detection even when quotas are exceeded (GitHub PR).

Impact

The vulnerability may lead to denial of service or server hang conditions as attackers can upload files of unbounded size, potentially exhausting server resources (NVD).

Mitigation and workarounds

The vulnerability was fixed in Pure-FTPd version 1.0.50 with commit 37ad222. The fix involves correcting the predicate order to ensure proper quota checking by evaluating maxfilesize = userquota_size - quota.size first (GitHub Commit).

Additional resources


SourceThis report was generated using AI

Related Pure-FTPd vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2024-48208HIGH8.6
  • Pure-FTPdPure-FTPd
  • cpe:2.3:a:pureftpd:pure-ftpd
NoYesOct 24, 2024
CVE-2021-40524HIGH7.5
  • Pure-FTPdPure-FTPd
  • pure-ftpd
NoYesSep 05, 2021
CVE-2020-35359HIGH7.5
  • Pure-FTPdPure-FTPd
  • pure-ftpd
NoYesDec 26, 2020
CVE-2020-9274HIGH7.5
  • Pure-FTPdPure-FTPd
  • pure-ftpd-debugsource
NoYesFeb 26, 2020
CVE-2020-9365HIGH7.5
  • Pure-FTPdPure-FTPd
  • pure-ftpd-debugsource
NoYesFeb 24, 2020

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management