Improper Privilege Management in shelljsGHSA-64g7-mvw6-v9qj
GHSA-64g7-mvw6-v9qj is a security vulnerability in shelljs. A fix is available for shelljs — see the affected versions and patch details below.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
shelljsnpmDescription
Impact
Output from the synchronous version of shell.exec() may be visible to other users on the same system. You may be affected if you execute shell.exec() in multi-user Mac, Linux, or WSL environments, or if you execute shell.exec() as the root user.
Other shelljs functions (including the asynchronous version of shell.exec()) are not impacted.
Patches
Patched in shelljs 0.8.5
Workarounds
Recommended action is to upgrade to 0.8.5.
References
https://huntr.dev/bounties/50996581-c08e-4eed-a90e-c0bac082679c/
For more information
If you have any questions or comments about this advisory:
- Ask at https://github.com/shelljs/shelljs/issues/1058
- Open an issue at https://github.com/shelljs/shelljs/issues/new
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | shelljs | all versions | 0.8.5npm install shelljs@0.8.5 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for shelljs, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update shelljs to 0.8.5 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-64g7-mvw6-v9qj is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Frequently Asked Questions
Is GHSA-64g7-mvw6-v9qj in your dependencies?
Find it across npm, including transitive dependencies.