fix: override ajv to >=8.18.0 to fix ReDoS vulnerability (GHSA-2g4f-4pwh-qvx6)#292
Conversation
…pwh-qvx6) ajv <=8.17.1 is vulnerable to Regular Expression Denial of Service when the $data option is enabled. The pattern keyword accepts runtime data via JSON Pointer syntax, which is passed directly to the RegExp constructor without validation. An attacker can inject a malicious regex pattern combined with crafted input to cause catastrophic backtracking — a 31-character payload blocks the CPU for ~44 seconds, doubling with each additional character. ajv is a transitive dependency pulled in by @jupyterlab/settingregistry and @modelcontextprotocol/sdk, so a pnpm override is used to force all instances to the patched version.
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughThe package.json is updated to add a pnpm override constraint on the 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #292 +/- ##
=======================================
Coverage 82.34% 82.34%
=======================================
Files 110 110
Lines 6785 6785
Branches 1817 1817
=======================================
Hits 5587 5587
Misses 1198 1198 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Resolve 4 moderate pnpm audit vulnerabilities in hono (transitive via packages/mcp > @modelcontextprotocol/sdk > hono), all fixed in 4.12.21: - GHSA-xrhx-7g5j-rcj5 (CVE-2026-47674, CVSS 5.3): ip-restriction middleware bypasses static deny rules for non-canonical IPv6. - GHSA-3hrh-pfw6-9m5x (CVE-2026-47675, CVSS 4.3): cookie helper does not sanitize sameSite and priority, allowing Set-Cookie injection. - GHSA-f577-qrjj-4474 (CVE-2026-47673, CVSS 4.8): jwt/jwk middleware accepts any Authorization scheme, not only Bearer. - GHSA-2gcr-mfcq-wcc3 (CVE-2026-47676, CVSS 5.3): app.mount() strips mount prefix using undecoded path, causing incorrect routing for percent-encoded paths. Bump the existing pnpm.overrides floor for hono >=4.12.18 -> >=4.12.21 following the established convention in this repo (see #387, #368, #307, #295, #292). pnpm install resolves hono to 4.12.23. After this change `pnpm audit` reports no known vulnerabilities. `pnpm typecheck`, `pnpm test` (2242 tests), and `pnpm prettier:check` all pass.
ajv <=8.17.1 is vulnerable to Regular Expression Denial of Service when the $data option is enabled. The pattern keyword accepts runtime data via JSON Pointer syntax, which is passed directly to the RegExp constructor without validation. An attacker can inject a malicious regex pattern combined with crafted input to cause catastrophic backtracking — a 31-character payload blocks the CPU for ~44 seconds, doubling with each additional character.
ajv is a transitive dependency pulled in by @jupyterlab/settingregistry and @modelcontextprotocol/sdk, so a pnpm override is used to force all instances to the patched version.
Summary by CodeRabbit