Skip to content
Heist/ feed
Back to feed
Medium

Python-Multipart affected by Denial of Service via large multipart preamble or epilogue data

Type: advisorySources: OSV

Python-Multipart is a streaming multipart parser for Python. Versions prior to 0.0.26 have a denial of service vulnerability when parsing crafted `multipart/form-data` requests with large preamble or epilogue sections. Upgrade to version 0.0.26 or later, which skips ahead to the next boundary candidate when processing leading CR/LF data and immediately discards epilogue data after the closing boundary.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-40347
Confirmed fixed CVEs
Not specified
Updated in this feed
2 Nov 2026, 16:33 UTC · Revision 1

Source evidence

Python-Multipart affected by Denial of Service via large multipart preamble or epilogue data

core-osv · Original source

Published 17 Apr 2026, 23:56 UTC

Python-Multipart is a streaming multipart parser for Python. Versions prior to 0.0.26 have a denial of service vulnerability when parsing crafted `multipart/form-data` requests with large preamble or epilogue sections. Upgrade to version 0.0.26 or later, which skips ahead to the next boundary candidate when processing leading CR/LF data and immediately discards epilogue data after the closing boundary.

osv:CVE-2026-40347
Complete source record
{
  "id": "d1ae3654d4eb469ea6627d16158d60ad1a4e59188ac39dfca8113a14cb7124dd",
  "url": "https://osv.dev/vulnerability/CVE-2026-40347",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Python-Multipart affected by Denial of Service via large multipart preamble or epilogue data",
    "summary": "Python-Multipart is a streaming multipart parser for Python. Versions prior to 0.0.26 have a denial of service vulnerability when parsing crafted `multipart/form-data` requests with large preamble or epilogue sections. Upgrade to version 0.0.26 or later, which skips ahead to the next boundary candidate when processing leading CR/LF data and immediately discards epilogue data after the closing boundary.",
    "evidence": "osv:CVE-2026-40347",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2026-40347",
      "aliases": [
        "CVE-2026-40347",
        "GHSA-mj87-hwqh-73pj",
        "PYSEC-2026-3038"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/kludex/python-multipart",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "28f47859b4a40c2e11e02dc514b2e9743ceedd2e"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "0.0.26"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "28f47859b4a40c2e11e02dc514b2e9743ceedd2e"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "0.0.26"
                  },
                  {
                    "cpe": "cpe:2.3:a:fastapiexpert:python-multipart:*:*:*:*:*:python:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "0.0.26"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "0.0.25",
            "0.0.24",
            "0.0.23",
            "0.0.22",
            "0.0.21",
            "0.0.20",
            "0.0.19",
            "0.0.18",
            "0.0.17",
            "0.0.16",
            "0.0.15",
            "0.0.14",
            "0.0.13",
            "0.0.12",
            "0.0.11",
            "0.0.10",
            "0.0.9",
            "0.0.8",
            "0.0.7",
            "0.0.6",
            "0.0.5",
            "0.0.4",
            "0.0.2"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-40347.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:21.336892584Z",
      "provider": "osv",
      "references": [
        "https://github.com/Kludex/python-multipart/releases/tag/0.0.26",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40347.json",
        "https://github.com/Kludex/python-multipart/security/advisories/GHSA-mj87-hwqh-73pj",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-40347"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-400",
          "CWE-834"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40347.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-40347",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 487209,
  "published_at": "2026-04-17T23:56:50.777+00:00"
}