Shelljs is a popular Node.js library that provides a set of portable Unix shell commands, allowing developers to execute common shell tasks directly from their JavaScript code. Version 0.5.0, released on May 19, 2015, follows the previous stable version 0.4.0, released on March 17, 2015. Both versions share the same core functionality: they aim to simplify scripting in Node.js by offering a familiar shell-like syntax. Key features include file manipulation (copying, moving, creating directories), string processing (grep, sed), and execution of external programs.
A notable difference can be spotted in the author's email address, which changes from aadib@mozilla.com in version 0.4.0 to arturadib@gmail.com in version 0.5.0, potentially indicating a change in Artur Adib's affiliation at the time. While the core dependencies and devDependencies (jshint) remain the same, the later version suggests continued maintenance, bug fixes, or minor enhancements that may not be explicitly documented in this metadata.
For developers using Shelljs, these versions offer a straightforward way to integrate shell commands into their Node.js projects, streamlining tasks like build processes, file system management, and system administration scripts. Shelljs enhances cross-platform compatibility, aiming to abstract away the differences between operating systems for common shell operations.
All the vulnerabilities related to the version 0.5.0 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: