Security: Fix CVE-2024-21538 (cross-spawn ReDoS)#19
Closed
vmrh21 wants to merge 1 commit intotest/workflow-cve-41174from
Closed
Security: Fix CVE-2024-21538 (cross-spawn ReDoS)#19vmrh21 wants to merge 1 commit intotest/workflow-cve-41174from
vmrh21 wants to merge 1 commit intotest/workflow-cve-41174from
Conversation
- Add npm override for cross-spawn ^7.0.6 to fix CVE-2024-21538 - Update all lock files in monorepo (root, backend, frontend) - Resolves RHOAIENG-17795, RHOAIENG-15602, RHOAIENG-15601, RHOAIENG-15600, RHOAIENG-15596, RHOAIENG-15598, RHOAIENG-15599, RHOAIENG-15597 CVE Details: - CVE ID: CVE-2024-21538 - Package: cross-spawn - Severity: HIGH (CVSS 7.5) - Impact: Regular Expression Denial of Service vulnerability - Vulnerable versions: < 6.0.6 and >= 7.0.0 < 7.0.5 - Fixed version: 7.0.6 Files Changed (4 total): - package.json (added overrides) - package-lock.json - backend/package-lock.json - frontend/package-lock.json Breaking Changes: - None - cross-spawn 7.0.6 is a pure security patch Testing: - Verified cross-spawn@7.0.6 via npm list - Confirmed CVE-2024-21538 no longer in npm audit Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Owner
Author
|
Test complete - resetting for fresh test |
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.
Summary
This PR fixes CVE-2024-21538 by upgrading cross-spawn to 7.0.6 via npm overrides.
CVE Details
Fix Method
Used npm
overridesfield in root package.json to force cross-spawn ^7.0.6 across all transitive dependencies. This is the recommended approach for fixing transitive dependency vulnerabilities.Test Results ✅
Status: ✅ All tests passed
Test Discovery: Tests found in package.json
Test Command:
npm testTest Framework: Jest + ESLint + TypeScript
Duration: 3.9 seconds
Test Summary
Verdict: The cross-spawn security fix does not break any existing functionality.
Changes
Files Changed (4 total):
package.json- Added npm overrides for cross-spawn ^7.0.6package-lock.json- Updated root workspacebackend/package-lock.json- Updated backend workspacefrontend/package-lock.json- Updated frontend workspaceNote: This is a monorepo - all workspace lock files must be updated together.
Breaking Changes
None. cross-spawn 7.0.6 is a pure security patch with no API changes.
Testing Checklist
Risk Assessment
References
.cve-fix/examples.md(CVE-2024-21538 section)🤖 Generated by CVE Fixer Workflow