Skip to content

fix multipart denial of service vulnerabilities

Choose a tag to compare

@github-actions github-actions released this 04 Nov 06:33
· 72 commits to 11.x since this release
Immutable release. Only release title and notes can be modified.

10.1.6 (2026-11-04)

This release fixes several denial of service vulnerabilities in multipart parsing. Everyone using @adonisjs/bodyparser@10.x should upgrade.

Security

  • A multipart file field named after an Object.prototype property, such as toString, constructor or __proto__, crashed the process with a single unauthenticated request (GHSA-8w45-cghr-9rh4).
  • Updated @poppinss/multiparty to 3.0.1, which brings in the fixes from upstream multiparty 4.3.1 (GHSA-jf2h-r4qp-9rp8):
    • CVE-2026-8159: ReDoS in Content-Disposition filename parsing.
    • CVE-2026-87908: unbounded memory use from oversized part headers. Part headers are now limited to 16KB.
    • CVE-2026-8162: process crash on malformed percent-encoding in filename*.
    • CVE-2026-8161: crash on field names inherited from Object.prototype. Bodyparser did not reach this code path, but it is fixed by the update.

Bug fixes

  • Part headers larger than 16KB are rejected with E_REQUEST_ENTITY_TOO_LARGE (413).
  • When multipart processing fails, the rest of the request body is drained before the error is returned, so clients receive the error response instead of ECONNRESET or EPIPE.
  • Multipart processing waits for running file handlers to finish before rejecting.

Behavior changes

  • Files with malformed filename* encoding are skipped instead of failing the request.
  • filename* values are decoded with decodeURIComponent, so encoded slashes (%2F) now appear decoded in file.clientName. file.move() uses a generated name by default. If you pass clientName as the name, sanitize it first.

Commits

  • drain multipart request body before rejecting (3e5c24c)
  • prevent DoS via inherited multipart handler names (2cce308)
  • report multipart part headers limit with E_REQUEST_ENTITY_TOO_LARGE (bc89927)
  • update @poppinss/multiparty to 3.0.1 (7691bac)
  • wait for multipart handlers before rejecting (540894d)

Full Changelog: v10.1.5...v10.1.6