id: CVE-2020-9274

info:
  name: Pure-FTPd ≤ 1.0.49 - DoS via Uninitialized Pointer
  author: pussycat0x
  severity: high
  description: |
    Pure-FTPd versions ≤ 1.0.49 (>= ~0.96) contain a vulnerability in the init_aliases() function within diraliases.c when processing aliases. This leads to access of an uninitialized pointer, which can cause a denial of service (DoS) condition.
  impact: |
    Attackers can trigger denial of service by exploiting an uninitialized pointer in the init_aliases() function when processing FTP aliases, causing the Pure-FTPd daemon to crash and disrupting FTP services.
  remediation: |
    Upgrade to Pure-FTPd version 1.0.50 or later that fixes the uninitialized pointer vulnerability in the diraliases.c file.
  reference:
    - https://lists.debian.org/debian-lts-announce/2020/02/msg00029.html
    - https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/22P44PECZWNDP7CMBL7NRBMNFS73C5Z2/
    - https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/B5NSUDWXZVWUCL6R2PTX3KBB42Z62CA5/
    - https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/U5DBVHJCXWRSJPNJQCJQCKZF6ZDPZCKA/
    - https://security.gentoo.org/glsa/202003-54
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 7.5
    cve-id: CVE-2020-9274
    cwe-id: CWE-824
    epss-score: 0.14489
    epss-percentile: 0.94535
    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.49"
      - cpe:"cpe:2.3:a:pureftpd:pure-ftpd"
  tags: cve,cve2020,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.49')"
        condition: and

    extractors:
      - type: regex
        group: 1
        name: version
        regex:
          - "Pure-FTPd ([0-9.]+)"
# digest: 4a0a0047304502205afded2642d53c752b28c6631bb43e22c80776c21c3668e32249149c07f5f0ef022100fea384e076b05f6f069ae0b4a5097c063b395b376f945198d80f47871424bafd:922c64590222798bb761d5b6d8e72950