Skip to main content
Menu
Advisories

@poppinss/multiparty fork used by @adonisjs/bodyparser is missing upstream multiparty security fixes

GHSA-JF2H-R4QP-9RP8Published Updated GitHub

Description

@adonisjs/bodyparser parses multipart requests with @poppinss/multiparty, a fork of multiparty. The fork did not include the security fixes released upstream in multiparty 4.3.0 and 4.3.1.

CVEUpstream advisoryIssueEffect through @adonisjs/bodyparser
CVE-2026-8159GHSA-65x3-rw7q-gx94ReDoS in Content-Disposition filename parsingA single request of about 1 MB blocked the event loop for about 20 seconds in our tests
CVE-2026-87908GHSA-5h46-2939-q3whPart headers are not size limitedMemory grows with the bytes sent until the process runs out of memory. The configured multipart limit does not apply to part headers
CVE-2026-8162GHSA-xh3c-6gcq-g4rvUncaught URIError on malformed filename* encodingProcess crash on Node.js 22 and earlier, and a 500 response on Node.js 24 and later
CVE-2026-8161GHSA-qxch-whhj-8956Uncaught TypeError on field names inherited from Object.prototypeNot reachable through @adonisjs/bodyparser. Affects code that calls form.parse(req, callback) from @poppinss/multiparty directly

The issues reachable through @adonisjs/bodyparser can be triggered by a single unauthenticated multipart/form-data request to any route that processes multipart bodies, using the default configuration.

Patches

  • @poppinss/multiparty 3.0.1 includes all fixes from upstream multiparty 4.3.1 and limits part headers to 16 KB.
  • @adonisjs/bodyparser 10.1.6 (AdonisJS v6) and 11.0.5 (AdonisJS v7) depend on @poppinss/multiparty 3.0.1 and reject oversized part headers with E_REQUEST_ENTITY_TOO_LARGE (413).

Workarounds

None. A request body size limit at a reverse proxy reduces exposure to the ReDoS and the memory growth, but does not remove it.

Original report

The report below covers CVE-2026-8159. The remaining issues were found while reviewing the fork against upstream.

Summary

@adonisjs/bodyparser@11.0.4 depends on @poppinss/multiparty@3.0.0, a separately published fork that still uses the inefficient Content-Disposition filename regular expression fixed upstream in pillarjs/multiparty@4.3.0 for GHSA-65x3-rw7q-gx94 / CVE-2026-8159. An unauthenticated multipart request can cause approximately quadratic synchronous parsing and block the Node.js event loop. On Node.js 24.19.0, a ~269 KB request took ~0.86 s versus ~5 ms for a same-size control; a ~538 KB request took ~3.82 s versus ~7 ms. The public upstream advisory names only the multiparty npm package, while the supported Poppinss/AdonisJS packages remain affected.

Details

Affected versions and commits

  • @adonisjs/bodyparser@11.0.4, commit 29342df208eafb523e64bbb25412f7dba77c08b0.
  • Current bodyparser 11.x head 9a7a71ad0bf4d9d063d4c16dddfe02ae78da61ca.
  • @poppinss/multiparty@3.0.0 and current master 270e5b1f7dbf2101247a2b341c37c6f3dd94c9bf.
  • Bodyparser commit bd1891c392865f5fe77546e8ecd488b4309b1eee introduced the fork and first shipped it in v6.0.0. Every published @poppinss/multiparty release from 1.0.0 through 3.0.0 contains the same lazy filename matcher. Please confirm maintained 10.x coverage.

Attacker model and preconditions

The attacker can send multipart/form-data to a route processed by bodyparser. No authentication is needed when the route is public. Default multipart auto-processing is exposed for POST, PUT, PATCH, and DELETE. The configured body limit does not prevent this payload because the expensive value is a multipart part header parsed before file data is counted; maxFieldsSize counts field bodies.

Root cause

@poppinss/multiparty/index.js:44 defines FILENAME_PARAM_RE as /\bfilename=(?:"(.?)"|([!#$%&'+.0-9A-Z^_\x60a-z|~-]+))($|; )/i. parseFilename executes it over the complete attacker-controlled Content-Disposition value at index.js:840. Repeated quote candidates force the lazy group and trailing delimiter check to reconsider an increasing number of endpoints. @adonisjs/bodyparser/src/multipart/main.ts:380 creates the Form with only maxFields and maxFieldsSize, neither of which limits accumulated part-header bytes or changes the matcher.

Upstream multiparty@4.3.0 replaced the vulnerable lazy-dot matcher with a linear construction. This report does not claim a new regex root cause; it reports a supported downstream fork/package exposure that is not named by the existing package advisory.

Duplicate review

I searched public issues, PRs, commits, releases, and advisories in adonisjs/core, adonisjs/bodyparser, and poppinss/multiparty for CVE-2026-8159, GHSA-65x3-rw7q-gx94, multiparty ReDoS, filename ReDoS, and FILENAME_PARAM_RE. No AdonisJS/Poppinss report or fix was found. Existing AdonisJS multipart advisories cover different roots: unbounded magic-buffer accumulation, path traversal, and prototype pollution.

Suggested remediation

  1. Port the upstream 4.3.0 filename parser fix into @poppinss/multiparty or replace the fork.
  2. Add a strict multipart part-header byte limit as defense in depth.
  3. Release patched Poppinss/bodyparser versions and require the patched dependency.
  4. Add an equal-size control/adversarial regression test with a generous ratio bound.

Suggested classification: CWE-1333. CVSS 3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H (7.5). Please determine the final severity, supported range, and whether the existing CVE can cover these packages or a separate GHSA/CVE is appropriate.

PoC archive retained for private follow-up: adonisjs-multipart-filename-redos-poc.zip, SHA-256 822858A0B36DEDFB690BB6CD30180BBD4C94A85C85758983942A8A4973B3F51E. The creation form does not expose a usable ZIP attachment control, so the complete source and results are included here and the archive can be uploaded in a private advisory comment after creation.

AI tooling assisted with source review, test-harness preparation, and report drafting. I independently ran the bounded local reproduction, verified every claim and artifact, and take responsibility for this report. Please credit @kigma00 if accepted.

Proof of concept

  1. Check out adonisjs/bodyparser at v11.0.4 (or current 11.x) and install dependencies so @poppinss/multiparty@3.0.0 is present.
  2. Save the following runner as security-poc/poc.mjs, or use the retained archive named below. The runner constructs equal-size control and crafted multipart streams in memory, executes them in separate child processes, and enforces a 20-second timeout. It opens no listening socket and contacts no external host.
  3. Run: node security-poc/poc.mjs
  4. Optional bounded larger case: node security-poc/poc.mjs 44800

The crafted Content-Disposition value is built from repeated near-matching filename fragments followed by a final valid filename delimiter. It is passed through the real @poppinss/multiparty Form parser; the same-size control uses non-matching filler.

Repeated ~269 KB results:

  • 5.5654 ms control vs 867.1030 ms crafted (155.8x)
  • 5.3787 ms control vs 856.0655 ms crafted (159.2x)
  • 5.1075 ms control vs 855.1874 ms crafted (167.4x)

Bounded ~538 KB result:

  • 7.0285 ms control vs 3821.9030 ms crafted (~543.8x)

Expected: linear-time parsing or rejection before expensive parsing. Actual: synchronous FILENAME_PARAM_RE work blocks the event loop, then eventually accepts the request.

Archive: adonisjs-multipart-filename-redos-poc.zip SHA-256: 822858A0B36DEDFB690BB6CD30180BBD4C94A85C85758983942A8A4973B3F51E Contents: README.md and poc.mjs.

Impact

A remote unauthenticated attacker can block an AdonisJS worker's single Node.js event loop with one sub-megabyte multipart request for several seconds on the tested environment. A small number of concurrent or repeated requests can deny service to unrelated clients. Reverse-proxy HTTP-header size limits do not normally help because the crafted value is a MIME part header inside the request body. Suggested CWE-1333 and CVSS 7.5 (availability only); maintainers should make the final assessment.

Affected versions

References

GitHub · adonisjs/core