Skip to content

fix: Bump body-parser from 2.3.0 to 2.4.0 - #3508

Merged
mtrezza merged 1 commit into
parse-community:alphafrom
mtrezza:fix/body-parser-2.4.0
Oct 27, 2026
Merged

mtrezza merged 1 commit into
parse-community:alphafrom
mtrezza:fix/body-parser-2.4.0

Conversation

@mtrezza

@mtrezza mtrezza commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Closes #3502

Upgrades body-parser from 2.3.0 to 2.4.0 to fix a high-severity denial of service vulnerability: GHSA-27r3-jxmh-p828 (CVE-2026-111181, Dependabot alert 486). In body-parser 2.0.0 to 2.3.x, a request with a compressed body (e.g. Content-Encoding: gzip) followed by trailing bytes can crash the Node.js process with an unhandled error event on the decompression stream. Parse Dashboard is affected without authentication:

  • Parse-Dashboard/app.js mounts express.json() and express.urlencoded({ extended: true }) globally, before routing and authentication. Express 5 re-exports the body-parser parsers.
  • Parse-Dashboard/Authentication.js uses bodyParser.urlencoded({ extended: true }).
  • All of them use the default inflate: true.

express 5.2.1 (^2.2.1) dedupes to the same body-parser copy. The lock file also moves body-parser's own dependencies qs 6.16.0 → 6.16.1 and iconv-lite 0.7.2 → 0.7.3.

Changes

body-parser 2.4.0

qs 6.16.1 (dependency of body-parser)

The same copy is also required by express 5.2.1, which calls qs.parse only when the query parser setting is extended. The default is simple, and Parse Dashboard sets no query parser. The dev dependency union 0.5.0 (via http-server) also requires it.

iconv-lite 0.7.3 (dependency of body-parser and raw-body)

The same copy is also required by @inquirer/external-editor 3.0.6 (via inquirer), which only uses the whole-buffer iconv.encodingExists and iconv.decode. For that use, the only visible change is that the new aliases exist. The dashboard CLI (Parse-Dashboard/CLI/mfa.js) has no editor prompt.

Effect on Parse Dashboard

Compared empirically by sending raw HTTP requests through the dashboard's parser setup with body-parser 2.3.0 (qs 6.16.0, iconv-lite 0.7.2) and 2.4.0 (qs 6.16.1, iconv-lite 0.7.3) on Node.js 22.19:

  • Crash fixed: a gzip JSON or urlencoded body followed by trailing bytes that arrive in a later TCP write crashes 2.3.0 (Error: incorrect header check, unhandled error event on Gunzip). 2.4.0 does not crash with gzip, deflate, br or zstd. Trailing bytes sent in the same write are sometimes ignored (200) rather than rejected with 400, depending on the input and timing; nothing crashes on 2.4.0.
  • zstd: Content-Encoding: zstd bodies were rejected with 415 and are now parsed on Node.js ^22.15.0 or >=23.8.0. The limit still applies after decompression (413). The official Docker image uses Node.js 20.19.0, so it keeps returning 415.
  • UTF-32 JSON bodies (charset=utf-32, utf-32le or utf-32be): a body split mid-code-unit across TCP chunks returned 400 and is now parsed. A body with 1 to 3 stray trailing bytes used to parse (when it arrived in one write) and now returns 400. If it was also split mid-unit, 2.3.0 already returned 400.
  • Extended urlencoded parsing: the parsed structure differs only when an object-valued key (e.g. a[b]=1) also receives two or more conflicting scalar values through a, [a] or a[]. Version 2.3.0 nests each conflict in a new array, while 2.4.0 appends to one object at the next numeric index. Both return 200. Real form submissions, including the login fields, parse identically. In a seeded fuzz of 3036 urlencoded inputs, 20 differed, all of this kind.
  • req.length: body-parser 2.3.0 left an own req.length property (undefined) on requests with uncompressed bodies; 2.4.0 does not set it. Parse Dashboard does not read it.
  • The JSON strict-mode checks, the charset checks and the size limits behave identically.

Lock File

  • package.json +1/−1 and package-lock.json +13/−13; the lock file only moves body-parser, qs and iconv-lite. This lock was generated on the current alpha. The lock file of refactor: Bump body-parser from 2.3.0 to 2.4.0 #3502 (+13/−47) also pruned gcp-metadata 7.0.1 and its nested gaxios 7.3.1, an optional peer dependency of mongodb, which this PR keeps.
  • @types/body-parser 1.19.6 (dev, via @types/express) is already the latest version and needs no change.
  • Engines: body-parser 2.4.0 requires Node.js >=18, qs 6.16.1 >=0.6, iconv-lite 0.7.3 >=0.10.0, all within this repository's engines.node.

Breaking Changes

None

Code Changes Required

None. The upgrade is a drop-in replacement; only package.json and package-lock.json change.

Summary by CodeRabbit

  • Chores
    • Updated underlying request-handling components and related supporting packages to newer versions.
    • These maintenance updates do not introduce user-facing features or change the app’s documented behavior.

@parse-github-assistant

Copy link
Copy Markdown

🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review.

Tip

  • Keep pull requests small. Large PRs will be rejected. Break complex features into smaller, incremental PRs.
  • Use Test Driven Development. Write failing tests before implementing functionality. Ensure tests pass.
  • Group code into logical blocks. Add a short comment before each block to explain its purpose.
  • We offer conceptual guidance. Coding is up to you. PRs must be merge-ready for human review.
  • Our review focuses on concept, not quality. PRs with code issues will be rejected. Use an AI agent.
  • Human review time is precious. Avoid review ping-pong. Inspect and test your AI-generated code.

Note

Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect.

Caution

Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement. Our CI and AI review are safeguards, not development tools. If many issues are flagged, rethink your development approach. Invest more effort in planning and design rather than using review cycles to fix low-quality code.

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: fdee43a0-bf7d-428d-a188-a7a473cfba4c
Commits

Reviewing files that changed from the base of the PR and between 13ecc66 and 750d719.

Files selected for processing: 2
  • package-lock.json
  • package.json

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Walkthrough

The project updates body-parser from 2.3.0 to 2.4.0. The lockfile refreshes the package metadata and updates the locked versions of iconv-lite and qs.

Changes: body-parser dependency update

Layer / File(s) Summary
Dependency version update
package.json, package-lock.json
package.json and the lockfile update body-parser to 2.4.0. The lockfile also updates the iconv-lite and qs entries to 0.7.3 and 6.16.1.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~8 minutes

Merge Risk: Minimal · up to 750d7

The dependency upgrade is ready to merge with no identified correctness or availability risk.

Pre-merge checks: Passed 6
Check name Status Explanation
Title check Passed The title begins with the accepted prefix "fix:" but the first letter after the prefix is lowercase in the sense that the requirement asks for a capitalized first letter of the title text; the title "…
Linked Issues check Passed The direct linked issue is #3502. package.json changes body-parser from 2.3.0 to 2.4.0. package-lock.json records body-parser 2.4.0 and its updated content-type, iconv-lite, and qs depende…
Out of Scope Changes check Passed The pull request changes only the requested dependency declaration and its lockfile resolution data. The iconv-lite and qs updates are body-parser dependency updates, and the content-type range …
Security Check Passed PASS: The pull request changes only dependency declarations and lockfile metadata. It upgrades the direct body-parser dependency from 2.3.0 to 2.4.0, with matching integrity data and refreshed `cont…
Engage In Review Feedback Passed No review feedback comments or actionable findings were supplied. The current review produced zero actionable findings, so there was no feedback requiring engagement, implementation, or discussion.
Description check Passed The description is thorough and follows the repository template in substance. It links the issue (Closes #3502), explains the security fix for GHSA-27r3-jxmh-p828, and describes the affected Parse Das…
Full details: Title check

Explanation

The title begins with the accepted prefix "fix:" but the first letter after the prefix is lowercase in the sense that the requirement asks for a capitalized first letter of the title text; the title "fix: Bump body-parser from 2.3.0 to 2.4.0" uses "Bump" capitalized, so the casing rule is met. It accurately describes the main change, which upgrades body-parser in package.json and package-lock.json from 2.3.0 to 2.4.0, along with its qs and iconv-lite lockfile updates.

Full details: Linked Issues check

Explanation

The direct linked issue is #3502. package.json changes body-parser from 2.3.0 to 2.4.0. package-lock.json records body-parser 2.4.0 and its updated content-type, iconv-lite, and qs dependency metadata. This adopts the 2.4.0 release, including the linked security fix, parser crash handling, request and option mutation fixes, and zstd support. No separate application code change is required for these package-provided behaviors.

Full details: Out of Scope Changes check

Explanation

The pull request changes only the requested dependency declaration and its lockfile resolution data. The iconv-lite and qs updates are body-parser dependency updates, and the content-type range update is lockfile metadata for body-parser. These changes support issue #3502 and no unrelated change is shown.

Full details: Security Check

Explanation

PASS: The pull request changes only dependency declarations and lockfile metadata. It upgrades the direct body-parser dependency from 2.3.0 to 2.4.0, with matching integrity data and refreshed content-type, iconv-lite, and qs ranges. The lockfile contains one installed body-parser entry, so Express 5.2.1 also resolves to 2.4.0. No application code or new security-sensitive pattern was introduced.

Full details: Description check

Explanation

The description is thorough and follows the repository template in substance. It links the issue (Closes #3502), explains the security fix for GHSA-27r3-jxmh-p828, and describes the affected Parse Dashboard code paths. It lists the dependency changes (body-parser, qs, iconv-lite) and reports empirical testing on Node.js 22.19, including zstd and Node.js version caveats. It also states that there are no breaking changes and no code changes required. Two template items are not addressed: the Tasks checklist ("Add tests" and "Add changes to documentation") is not marked or explained, and the template's Issue and Approach headings are present only as content rather than as the template's exact headings. The description is long, but its required content is present.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@mtrezza
mtrezza merged commit cb9caf8 into parse-community:alpha Oct 27, 2026
11 checks passed
@mtrezza
mtrezza deleted the fix/body-parser-2.4.0 branch October 27, 2026 12:11
parseplatformorg pushed a commit that referenced this pull request Oct 27, 2026
# [9.3.0-alpha.14](9.3.0-alpha.13...9.3.0-alpha.14) (2026-10-27)

### Bug Fixes

* Bump body-parser from 2.3.0 to 2.4.0 ([#3508](#3508)) ([cb9caf8](cb9caf8))
@parseplatformorg

Copy link
Copy Markdown
Contributor

🎉 This change has been released in version 9.3.0-alpha.14

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Oct 27, 2026
parseplatformorg pushed a commit that referenced this pull request Nov 4, 2026
# [10.0.0](9.2.0...10.0.0) (2026-11-04)

### Bug Fixes

* Add Cancel and Add buttons to the add-row modal ([#1995](#1995)) ([#3383](#3383)) ([2d1b739](2d1b739))
* Advertise localhost instead of 0.0.0.0 in the dashboard startup message ([#3410](#3410)) ([33ce7b8](33ce7b8))
* Bump body-parser from 2.2.2 to 2.3.0 ([#3465](#3465)) ([662899b](662899b))
* Bump body-parser from 2.3.0 to 2.4.0 ([#3508](#3508)) ([cb9caf8](cb9caf8))
* Bump brace-expansion from 1.1.13 to 1.1.21 ([#3454](#3454)) ([937fe17](937fe17))
* Bump glob from 10.4.5 to 10.5.0 and minimatch from 9.0.1 to 9.0.9 ([#3467](#3467)) ([f31ada5](f31ada5))
* Bump immutable from 5.1.5 to 5.1.9 ([#3457](#3457)) ([5097c04](5097c04))
* Bump markdown-it from 14.3.0 to 14.3.3 ([#3494](#3494)) ([12d7cc0](12d7cc0))
* Bump parse from 8.5.0 to 8.6.2 ([#3468](#3468)) ([8a4c12b](8a4c12b))
* Bump proxy-addr from 2.0.7 to 2.0.8 ([#3490](#3490)) ([e017c62](e017c62))
* Bump qs from 6.15.3 to 6.16.0 ([#3458](#3458)) ([04f5acb](04f5acb))
* Info panel data not loaded when opened over an existing selection ([#3384](#3384)) ([4879959](4879959))
* Prevent Config table crash when a parameter value is null ([#3424](#3424)) ([7150acf](7150acf))
* Remote access restrictions not enforced when running behind a reverse proxy ([#3436](#3436)) ([60cb379](60cb379))
* Security upgrade Docker image from Node.js 20 to 24 ([#3518](#3518)) ([9dc2c30](9dc2c30))

### Features

* Add support for Node.js 26 ([#3525](#3525)) ([bdc5d62](bdc5d62))
* React 19 + react-router 7 + GraphiQL 5 coordinated upgrade ([#3409](#3409)) ([c3e16c2](c3e16c2))
* Remove Node 20 support and increase minimum required Node 22 version to `22.13.0` ([#3527](#3527)) ([2ff9098](2ff9098))

### BREAKING CHANGES

* Removes support for Node 20 and increases the minimum required Node 22 version to `22.13.0`. ([2ff9098](2ff9098))
@parseplatformorg

Copy link
Copy Markdown
Contributor

🎉 This change has been released in version 10.0.0

@parseplatformorg parseplatformorg added the state:released Released as stable version label Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:released Released as stable version state:released-alpha Released as alpha version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants