fix: resolve ajv ReDoS vulnerability by forcing ajv@8.18.0#26141
Merged
innerdvations merged 3 commits intoMay 29, 2026
Merged
Conversation
Fixes strapi#25999 Snyk reported ajv@8.13.0 as vulnerable to Regular Expression Denial of Service (ReDoS) (CVSS 8.2, CWE-1333). The vulnerability exists in the transitive dependency chain: @strapi/database -> umzug@3.8.1 -> @rushstack/ts-command-line@4.23.1 -> @rushstack/terminal@0.14.3 -> @rushstack/node-core-library@5.10.0 -> ajv@~8.13.0 This fix forces all ajv v8 dependencies to the patched 8.18.0 version via Yarn resolutions, which prevents the vulnerable 8.13.0 from being installed.
|
@itsmejay80 is attempting to deploy a commit to the Strapi Team on Vercel. A member of the Team first needs to authorize it. |
2 tasks
There was a problem hiding this comment.
Pull request overview
Pins ajv to a patched version to eliminate the reported ReDoS vulnerability exposure coming from transitive dependencies (notably via @rushstack/node-core-library).
Changes:
- Add Yarn
resolutionsto forceajvrequests matching^8.0.0and~8.13.0to resolve to8.18.0. - Update
yarn.lockto removeajv@8.13.0and consolidateajvv8 to8.18.0(with related lock entry updates such asuri-jsdescriptor consolidation).
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| package.json | Adds Yarn resolutions to pin ajv to 8.18.0 for affected semver ranges. |
| yarn.lock | Removes ajv@8.13.0 from the lockfile and reflects the pinned ajv@8.18.0 resolution. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Keep ajv@8.18.0 yarn resolutions alongside develop's webpack pin. Regenerate yarn.lock after merge.
Scope v8 resolutions to patched 8.20.0 without overriding eslint's ajv v6 dependency. Bump the direct @strapi/database ajv pin to match.
innerdvations
approved these changes
May 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does it do?
Forces all
ajvv8 dependencies to the patched8.18.0version via Yarn resolutions, preventing the vulnerableajv@8.13.0from being installed.The vulnerable dependency path was:
Why is it needed?
Snyk reports
ajv@8.13.0as vulnerable to Regular Expression Denial of Service (ReDoS) with CVSS 8.2 (High severity, CWE-1333). This affects Strapi installations via the transitive dependency chain through@rushstack/node-core-library.How to test it?
yarn why ajv- confirmajv@8.13.0is no longer presentyarn test:unit- tests continue to pass (274/289 suites pass; remaining 15 failures are pre-existing module resolution issues unrelated to this change)Related issue(s)/PR(s)
Fixes #25999