{"id":"CVE-2026-40347","aliases":["CVE-2026-40347","GHSA-mj87-hwqh-73pj","PYSEC-2026-3038"],"related":[],"kind":"vulnerability","state":"published","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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nA denial of service vulnerability exists when parsing crafted `multipart/form-data` requests with large preamble or epilogue sections.\n\n### Details\n\nTwo inefficient multipart parsing paths could be abused with attacker-controlled input.\n\nBefore the first multipart boundary, the parser handled leading CR and LF bytes inefficiently while searching for the start of the first part. After the closing boundary, the parser continued processing trailing epilogue data instead of discarding it immediately. As a result, parsing time could grow with the size of crafted data placed before the first boundary or after the closing boundary.\n\n### Impact\n\nAn attacker can send oversized malformed multipart bodies that consume excessive CPU time during request parsing, reducing request-handling capacity and delaying legitimate requests. This issue degrades availability but does not typically result in a complete denial of service for the entire application.\n\n### Mitigation\n\nUpgrade 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Python-Multipart es un analizador multipart de streaming para Python. Las versiones anteriores a la 0.0.26 tienen una vulnerabilidad de denegación de servicio al analizar solicitudes ’multipart/form-data’ especialmente diseñadas con secciones de preámbulo o epílogo grandes. Actualice a la versión 0.0.26 o posterior, que salta al siguiente candidato de límite al procesar datos CR/LF iniciales y descarta inmediatamente los datos del epílogo después del límite de cierre.","source":"nvd"}],"published":"2026-04-15T19:45:44.000Z","modified":"2026-10-26T21:10:00.170Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"}],"cwes":["CWE-400","CWE-834"],"affected":[{"ranges":[{"version":"< 0.0.26","status":"affected"}],"vendor":"Kludex","product":"python-multipart","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.0.26"}],"ecosystem":"PyPI","package":"python-multipart","purl":"pkg:pypi/python-multipart","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.0.26"}],"vendor":"fastapiexpert","product":"python-multipart","cpe":"cpe:2.3:a:fastapiexpert:python-multipart:*:*:*:*:*:python:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.0.26"}],"ecosystem":"PyPI","package":"python-multipart","purl":"pkg:pypi/python-multipart","source":"pysec"}],"references":[{"url":"https://github.com/Kludex/python-multipart/security/advisories/GHSA-mj87-hwqh-73pj","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/Kludex/python-multipart/releases/tag/0.0.26","tags":["product","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40347","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/Kludex/python-multipart","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/python-multipart","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-mj87-hwqh-73pj","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-04-20T15:46:36.258Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-40347","url":"https://www.cve.org/CVERecord?id=CVE-2026-40347","licence":"CVE Terms of Use","modified":"2026-04-20T15:46:40.011Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-mj87-hwqh-73pj","url":"https://github.com/advisories/GHSA-mj87-hwqh-73pj","licence":"CC-BY-4.0","modified":"2026-09-10T03:51:02.322Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-40347","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40347","licence":"Public domain","modified":"2026-10-26T21:10:00.170Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-3038","url":"https://osv.dev/vulnerability/PYSEC-2026-3038","licence":"CC-BY-4.0","modified":"2026-07-13T16:33:29.086Z"}],"updatedAt":"2026-11-25T22:59:18.984Z","epss":{"score":0.00364,"percentile":0.323,"date":"2026-12-01T12:00:22.000Z"}}