Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2020-5204

In uftpd before 2.11, there is a buffer overflow vulnerability in handle_PORT in ftpcmd.c that is caused by a buffer that is 16 bytes large being filled via sprintf() with user input based on the format specifier string %d.%d.%d.%d. The 16 byte size is correct for valid IPv4 addresses (len('255.255.255.255') == 16), but the format specifier %d allows more than 3 digits. This has been fixed in version 2.11

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2020-5204
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 12:36 UTC · Revision 1

Source evidence

CVE-2020-5204

core-osv · Original source

Published 6 Jan 2020, 20:15 UTC

In uftpd before 2.11, there is a buffer overflow vulnerability in handle_PORT in ftpcmd.c that is caused by a buffer that is 16 bytes large being filled via sprintf() with user input based on the format specifier string %d.%d.%d.%d. The 16 byte size is correct for valid IPv4 addresses (len('255.255.255.255') == 16), but the format specifier %d allows more than 3 digits. This has been fixed in version 2.11

osv:CVE-2020-5204
Complete source record
{
  "id": "e87c52038d5bd7ab2f1493d3fdf1342446b73986d26845897034cd723d7f1947",
  "url": "https://osv.dev/vulnerability/CVE-2020-5204",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2020-5204",
    "summary": "In uftpd before 2.11, there is a buffer overflow vulnerability in handle_PORT in ftpcmd.c that is caused by a buffer that is 16 bytes large being filled via sprintf() with user input based on the format specifier string %d.%d.%d.%d. The 16 byte size is correct for valid IPv4 addresses (len('255.255.255.255') == 16), but the format specifier %d allows more than 3 digits. This has been fixed in version 2.11",
    "evidence": "osv:CVE-2020-5204",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2020-5204",
      "aliases": [
        "CVE-2020-5204",
        "GHSA-wrpr-xw7q-9wvq"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/troglobit/uftpd",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "6927628afa0d3ade8feb9fadd9672420cd2fbeb5"
                },
                {
                  "fixed": "0fb2c031ce0ace07cc19cd2cb2143c4b5a63c9dd"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:troglobit:uftpd:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.11"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "0fb2c031ce0ace07cc19cd2cb2143c4b5a63c9dd"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v2.10",
            "v2.9",
            "v2.8",
            "v2.7",
            "v2.6",
            "v2.5",
            "v1.8",
            "v1.7",
            "v1.6",
            "v1.5",
            "v1.4",
            "v1.3",
            "v1.2",
            "v1.1",
            "v1.0",
            "v0.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2020-5204.json",
            "vanir_signatures": [
              {
                "id": "CVE-2020-5204-a2bfc361",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "305627866150381828683865241657895014322",
                    "12937131316666879073544403319990601086",
                    "173866264394877993175631420443797992491",
                    "250823014807152732547613692800473923267"
                  ]
                },
                "source": "https://github.com/troglobit/uftpd/commit/0fb2c031ce0ace07cc19cd2cb2143c4b5a63c9dd",
                "target": {
                  "file": "src/ftpcmd.c"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2020-5204-d12c122b",
                "digest": {
                  "length": 898,
                  "function_hash": "73284893654735530245356761491877463198"
                },
                "source": "https://github.com/troglobit/uftpd/commit/0fb2c031ce0ace07cc19cd2cb2143c4b5a63c9dd",
                "target": {
                  "file": "src/ftpcmd.c",
                  "function": "handle_PORT"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              }
            ],
            "vanir_signatures_modified": "2026-10-20T13:59:41Z"
          }
        }
      ],
      "modified": "2026-10-20T13:59:41.401353193Z",
      "provider": "osv",
      "references": [
        "https://github.com/troglobit/uftpd/security/advisories/GHSA-wrpr-xw7q-9wvq",
        "https://github.com/troglobit/uftpd/commit/0fb2c031ce0ace07cc19cd2cb2143c4b5a63c9dd"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2020-5204",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 388499,
  "published_at": "2020-01-06T20:15:12.523+00:00"
}