Skip to content

Security: Fix CVE-2024-21538 (cross-spawn ReDoS)#19

Closed
vmrh21 wants to merge 1 commit intotest/workflow-cve-41174from
fix/cve-2024-21538-cross-spawn-attempt-1
Closed

Security: Fix CVE-2024-21538 (cross-spawn ReDoS)#19
vmrh21 wants to merge 1 commit intotest/workflow-cve-41174from
fix/cve-2024-21538-cross-spawn-attempt-1

Conversation

@vmrh21
Copy link
Copy Markdown
Owner

@vmrh21 vmrh21 commented Feb 19, 2026

Summary

This PR fixes CVE-2024-21538 by upgrading cross-spawn to 7.0.6 via npm overrides.

CVE Details

  • CVE ID: CVE-2024-21538
  • Package: cross-spawn
  • Severity: HIGH (CVSS 7.5)
  • Impact: Regular Expression Denial of Service (ReDoS) vulnerability
  • Vulnerable versions: < 6.0.6 and >= 7.0.0 < 7.0.5
  • Fixed version: 7.0.6
  • Jira Issues: RHOAIENG-17795, RHOAIENG-15602, RHOAIENG-15601, RHOAIENG-15600, RHOAIENG-15596, RHOAIENG-15598, RHOAIENG-15599, RHOAIENG-15597

Fix Method

Used npm overrides field 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 test
Test Framework: Jest + ESLint + TypeScript
Duration: 3.9 seconds

Test Summary
  • Test Suites: 4 passed, 4 total
  • Tests: 30 passed, 30 total
  • Snapshots: 0 total
  • Components Tested:
    • Backend linting and type checking ✅
    • Frontend unit tests ✅
      • notebookControllerUtils.spec.ts
      • EnabledApplications.spec.tsx
      • ExploreApplications.spec.tsx
      • LearningCenter.spec.tsx

Verdict: The cross-spawn security fix does not break any existing functionality.

Changes

Files Changed (4 total):

  1. package.json - Added npm overrides for cross-spawn ^7.0.6
  2. package-lock.json - Updated root workspace
  3. backend/package-lock.json - Updated backend workspace
  4. frontend/package-lock.json - Updated frontend workspace

Note: 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

  • Pre-fix verification: CVE-2024-21538 present in npm audit
  • Post-fix verification: cross-spawn@7.0.6 installed
  • Post-fix verification: CVE no longer in npm audit
  • Test execution: All 30 tests passed
  • Manual functionality testing (recommended)

Risk Assessment

Risk Factor Level Details
Breaking Changes None Security patch only
Dependency Conflicts Low Override applied cleanly
Functionality Impact Low cross-spawn used by build tools
Test Results ✅ Passed All automated tests passed
Rollback Complexity Very Low Single override removal

References


🤖 Generated by CVE Fixer Workflow

- 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>
@vmrh21
Copy link
Copy Markdown
Owner Author

vmrh21 commented Feb 19, 2026

Test complete - resetting for fresh test

@vmrh21 vmrh21 closed this Feb 19, 2026
@vmrh21 vmrh21 deleted the fix/cve-2024-21538-cross-spawn-attempt-1 branch February 19, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants