HexBrain

Browse / CVEs / CVE-2021-40524

CVE-2021-40524· pureftpd / pure-ftpd· CWE-434

Pure-FTPd 1.0.23 < 1.0.50 - Arbitrary File Upload

highseverity
7.5CVSS score
4.3%likelihood of exploitation, next 30 days
91%of all CVEs are less likely
Readycheck to confirm it

Pure-FTPd versions 1.0.23 through 1.0.49 contain an arbitrary file upload vulnerability due to max_filesize quota issue, allowing large or unbounded file uploads that can cause server hang or resource exhaustion.

Impact

Attackers can bypass max_filesize quotas to upload extremely large files or unlimited files to the FTP server, causing resource exhaustion, disk space exhaustion, and potential denial of service.

Fix

Upgrade to Pure-FTPd version 1.0.50 or later that properly enforces max_filesize quotas to prevent resource exhaustion attacks.

How to confirm it

Send: tcp probe to {{Hostname}}
Positive when: contains(raw, 'Pure-FTPd') and compare_versions(version, '> 1.0.23 ', '<= 1.0.50')

Run it with nuclei: nuclei -id CVE-2021-40524 -u <target>

The full check
id: CVE-2021-40524

info:
  name: Pure-FTPd 1.0.23 < 1.0.50 - Arbitrary File Upload
  author: pussycat0x
  severity: high
  description: |
    Pure-FTPd versions 1.0.23 through 1.0.49 contain an arbitrary file upload vulnerability due to max_filesize quota issue, allowing large or unbounded file uploads that can cause server hang or resource exhaustion.
  impact: |
    Attackers can bypass max_filesize quotas to upload extremely large files or unlimited files to the FTP server, causing resource exhaustion, disk space exhaustion, and potential denial of service.
  remediation: |
    Upgrade to Pure-FTPd version 1.0.50 or later that properly enforces max_filesize quotas to prevent resource exhaustion attacks.
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
    cvss-score: 7.5
    cve-id: CVE-2021-40524
    cwe-id: CWE-434
    epss-score: 0.04285
    epss-percentile: 0.91191
    cpe: cpe:2.3:a:pureftpd:pure-ftpd:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: pureftpd
    product: pure-ftpd
    shodan-query:
      - product:"pure-ftpd" version:"1.0.45"
      - cpe:"cpe:2.3:a:pureftpd:pure-ftpd"
  tags: cve,cve2021,network,ftp,pure-ftpd,tcp,passive,vuln

tcp:
  - inputs:
      - data: 00000000
        type: hex

    host:
      - "{{Hostname}}"

    port: 21
    read-size: 1024

    matchers:
      - type: dsl
        dsl:
          - "contains(raw, 'Pure-FTPd')"
          - "compare_versions(version, '> 1.0.23 ', '<= 1.0.50')"
        condition: and

    extractors:
      - type: regex
        group: 1
        name: version
        regex:
          - "Pure-FTPd ([0-9.]+)"

Use this check only on systems you are authorised to test. Where the data comes from