-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
refactor: Security upgrade express from 4.21.2 to 4.22.0 #3100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: alpha
Are you sure you want to change the base?
Conversation
The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-QS-14724253
|
I will reformat the title to use the proper commit message syntax. |
|
🚀 Thanks for opening this pull request! |
📝 WalkthroughWalkthroughA minor dependency version update in Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (1)
package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Docker linux/amd64
🔇 Additional comments (1)
package.json (1)
48-48: Verify package-lock.json alignment.Since package-lock.json was also modified in this PR, ensure that the lock file correctly reflects the Express 4.22.0 update and all transitive dependencies (especially
qs) are properly resolved and secure.
| "core-js": "3.47.0", | ||
| "csurf": "1.11.0", | ||
| "express": "4.21.2", | ||
| "express": "4.22.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
Express 4.22.0 release notes changelog qs vulnerability
💡 Result:
Short summary:
- Express 4.22.0 (Dec 1, 2024) listed an "Important: Security" entry ( Security fix for CVE-2024-51999 ). [1]
- The very next release, 4.22.1, reverted the 4.22.0 query-parser change and explicitly says the prior change was erroneous and "there is no actual security vulnerability associated with this behavior (CVE-2024-51999 has been rejected)". Use 4.22.1 instead of 4.22.0 if you need the stable behavior. [1]
Background on qs: the well-known qs prototype-pollution / DoS issue is CVE-2022-24999 (qs < 6.10.3), which affected Express versions predating the backport (Express 4.17.3 included a patched qs). That CVE is separate and was fixed in the qs/Express releases from 2022/2023. [2][3]
Sources:
- Express releases (4.22.0 and 4.22.1). [1]
- CVE-2022-24999 / qs vulnerability details. [2][3]
🌐 Web query:
SNYK-JS-QS-14724253 vulnerability qs library patch fix
💡 Result:
Summary: SNYK-JS-QS-14724253 corresponds to CVE-2025-15284 — an arrayLimit bypass in qs that allows memory-exhaustion DoS when parsing bracket notation (a[]=...). Fixed in qs version 6.14.1. Remediation: upgrade qs to >= 6.14.1 (e.g., npm install qs@^6.14.1) and, if needed, add application-level limits on parsed array sizes. [1][2]
Sources:
[1] Snyk advisory for SNYK-JS-QS-14724253 (fix: upgrade to 6.14.1 or higher).
[2] GitLab advisory / CVE-2025-15284 (affected <6.14.1; fixed in 6.14.1).
🌐 Web query:
Express 4.22.0 vs 4.21.2 breaking changes
💡 Result:
Short answer: there are no intentional breaking API changes between 4.21.2 and 4.22.0 — 4.22.0 was a security release (CVE-2024-51999) that briefly introduced an unintended/erroneous change to the extended query parser which could break some apps; that erroneous change was reverted in the follow-up 4.22.1. If you want to avoid the risk, upgrade to 4.22.1 (or stay on 4.21.2). [1][2]
Details / sources:
- 4.22.0: security fix (CVE-2024-51999). Full changelog on the Express GitHub releases page. [1]
- 4.22.1: explicitly notes the prior release (4.22.0) included an erroneous breaking change related to the extended query parser and that it was reverted. Upgrade to 4.22.1 to avoid that behavior. [1]
- For related 4.21.x notes (deprecation of "back" redirect string, dependency bumps), see the Express changelog/security updates. [2][3]
Sources:
[1] expressjs/express — Releases (4.22.1 / 4.22.0).
[2] Express — Security updates (4.x).
[3] Express changelog (4.21.0 / 4.20.0 notes).
Express 4.22.0 does not address SNYK-JS-QS-14724253, and introduces a breaking change in the query parser.
SNYK-JS-QS-14724253 (CVE-2025-15284) is an arrayLimit bypass in the qs library, fixed in qs >= 6.14.1. Express 4.22.0's security note references CVE-2024-51999, a different issue that was erroneous and later reverted in 4.22.1. Verify that package-lock.json contains qs >= 6.14.1 to actually resolve the stated vulnerability. Additionally, Express 4.22.0 introduced an unintended breaking change to the extended query parser that was reverted in 4.22.1; consider upgrading to 4.22.1 or confirm that the query parser change does not break your application.
🤖 Prompt for AI Agents
In package.json around line 48, the dependency pinned to "express": "4.22.0"
does not ensure the qs >=6.14.1 fix for SNYK-JS-QS-14724253 and contains a
breaking query-parser change; update package.json to "express": "4.22.1" (or a
later secure Express) then run npm install to regenerate package-lock.json,
confirm package-lock.json contains qs >= 6.14.1, and run your app/tests to
validate that the extended query parser behavior is unaffected (if you cannot
upgrade, explicitly ensure qs is >=6.14.1 in package-lock or add a
resolution/override and verify tests).
Snyk has created this PR to fix 1 vulnerabilities in the npm dependencies of this project.
Snyk changed the following file(s):
package.jsonpackage-lock.jsonVulnerabilities that will be fixed with an upgrade:
SNYK-JS-QS-14724253
Important
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic
Learn how to fix vulnerabilities with free interactive lessons:
🦉 Allocation of Resources Without Limits or Throttling
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.