id: CVE-2004-1641

info:
  name: Titan FTP ≤ 3.21 - Heap Overflow via Long Commands
  author: pussycat0x
  severity: medium
  description: |
    Titan FTP versions ≤ 3.21 contain heap overflow vulnerabilities when processing long FTP commands such as CWD, STAT, or LIST. Remote attackers can cause denial of service (daemon crash) by sending excessively long arguments to these commands, potentially leading to server instability.
  impact: |
    Attackers can trigger heap overflow conditions by sending excessively long FTP commands, causing Titan FTP Server to crash and resulting in denial of service.
  remediation: |
    Upgrade Titan FTP Server to a version later than 3.21 that properly validates command length and prevents heap overflow.
  reference:
    - http://marc.info/?l=bugtraq&m=109396159332523&w=2
    - https://exchange.xforce.ibmcloud.com/vulnerabilities/17172
  classification:
    cvss-metrics: CVSS:2.0/AV:N/AC:L/Au:N/C:N/I:N/A:P
    cvss-score: 5
    cve-id: CVE-2004-1641
    epss-score: 0.0824
    epss-percentile: 0.94176
    cpe: cpe:2.3:a:south_river_technologies:titan_ftp_server:2.2:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    vendor: south_river_technologies
    product: titan_ftp_server
    shodan-query: product:"Titan ftpd"
  tags: cve,cve2004,network,ftp,titan-ftp,tcp,passive,heap-overflow,vuln
tcp:
  - inputs:
      - data: 00000000
        type: hex

    host:
      - "{{Hostname}}"

    port: 21
    read-size: 1024

    matchers:
      - type: dsl
        dsl:
          - "contains(raw, 'Titan')"
          - "compare_versions(version, '<= 3.21')"
        condition: and

    extractors:
      - type: regex
        group: 1
        name: version
        regex:
          - "Titan FTP Server ([0-9.]+)"
# digest: 4a0a00473045022047d56e3ca733001cb0b7c47e6c95bf435088b1db402e2a9fb2be10d4dd2fd9af022100971567a1f78f7edef1da8b8ed7bd62ae089ecef0dff640f69f2db1694f0524e3:922c64590222798bb761d5b6d8e72950