Shelljs is a popular Node.js library that provides a set of portable Unix shell commands, simplifying cross-platform scripting. Comparing versions 0.2.0 and 0.2.1, the updates appear incremental, primarily bug fixes and minor improvements. Both versions share identical core features: offering a wide array of shell utilities directly within Node.js, such as file manipulation (copy, move, delete), string processing (grep, sed), and process execution. Developers benefit from using familiar shell syntax within their JavaScript code, streamlining tasks like automating builds, managing files, and interacting with the operating system. The identical dependencies and devDependencies (specifically JSHint for code quality) indicate a consistent development approach. Version 0.2.1, released just a day after 0.2.0, likely addresses immediate issues discovered in the earlier release. For new projects, choosing the latest stable version (0.2.1) is recommended. Existing projects on 0.2.0 should consider upgrading for potentially improved stability and bug fixes. While no groundbreaking changes are apparent, these small updates are vital for maintaining the reliability and usability of Shelljs in diverse Node.js environments. The library's strength lies in its ease of use and the substantial time savings it offers by eliminating the need for platform-specific shell scripting.
All the vulnerabilities related to the version 0.2.1 of the package
Improper Privilege Management in shelljs
shelljs is vulnerable to Improper Privilege Management
Improper Privilege Management in shelljs
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.
Patched in shelljs 0.8.5
Recommended action is to upgrade to 0.8.5.
https://huntr.dev/bounties/50996581-c08e-4eed-a90e-c0bac082679c/
If you have any questions or comments about this advisory: