Skip to content
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

Task: Upgrade cross-spawn version due to Node Cross-Spawn Vulnerability (CVE-2024–21538) #1038

Open
3 tasks
vinhyan opened this issue Dec 5, 2024 · 4 comments

Comments

@vinhyan
Copy link
Contributor

vinhyan commented Dec 5, 2024

Describe the task

Looks like the issue of cross-spawn might be from this transitive dependency, upgrading the parent dependency is needed:
image

High vulnerability issue with the current cross-spawn version 7.0.3. CVE-2024-21538

npm audit fix cannot fix unless bumping up version to 7.0.5 or above.

Acceptance Criteria

  • cross-spawn dependency is updated to version 7.0.5 or higher in the npm package.
  • The vulnerability CVE-2024-21538 in cross-spawn is no longer flagged by npm audit.
  • The fix does not break any existing functionality or dependencies in the project.

Additional context

  • This issue is affecting code commits due to a failure in npm audit.
    CVE-2024-21538
@vinhyan vinhyan changed the title Task: Update cross-pawn version due to Node Cross-Spawn Vulnerability (CVE-2024–21538) Task: Upgrade cross-pawn version due to Node Cross-Spawn Vulnerability (CVE-2024–21538) Dec 5, 2024
@vinhyan vinhyan changed the title Task: Upgrade cross-pawn version due to Node Cross-Spawn Vulnerability (CVE-2024–21538) Task: Upgrade cross-spawn version due to Node Cross-Spawn Vulnerability (CVE-2024–21538) Dec 5, 2024
@vinhyan
Copy link
Contributor Author

vinhyan commented Dec 6, 2024

Our locked npm version is 10.8.3, which uses cross-spawn v7.0.3—a version with the above vuln. I tested modifying the npm version to 10.9.1 directly in the lockfile, deleted node_modules, and ran npm i. This approach worked, as npm 10.9.1 uses cross-spawn 7.0.6, which does not have the vuln issue. However, I’m not sure if manually editing the lockfile is recommended.

This issue is currently blocking me from committing code, so any advice on resolving it would be greatly appreciated. :) @CodeWritingCow

@vinhyan
Copy link
Contributor Author

vinhyan commented Dec 7, 2024

@nlebovits also looping you in for advice on this. Thanks! :)

@nlebovits
Copy link
Collaborator

Hey @vinhyan sorry for my slow response on this! Was OOO while traveling. I'm not a JS expert at all but I'll make sure @CodeWritingCow sees this and gets back to you.

@CodeWritingCow
Copy link
Collaborator

@vinhyan When I ran npm update and then npm audit locally, the vulnerability alert for cross-spawn disappeared.

Also ran npm ls cross-spawn to verify that cross-spawn got upgraded to v7.0.6:
Screen Shot 2024-12-15 at 3 25 49 PM

Generally, I recommend not manually changing package-lock.json. We should update and manage it using npm commands such as npm install and npm update. That file tracks both our application's top dependencies and their nested dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

3 participants