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.05957
    epss-percentile: 0.92547
    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: 4a0a00473045022038852de80a14c4f8ef90c24b01249b1c7e80f1275d09ab4301a7740ea5a5feed022100b8ad97158032c42330af29df3966c51acf6f0b4e19aa5adc9faf9f726c270cbc:922c64590222798bb761d5b6d8e72950