The "global" npm package, designed to reliably access global variables across different JavaScript environments, saw a notable update from version 4.3.2 to 4.4.0. This release, published in June 2019, introduces key dependency changes that developers should be aware of.
The most significant difference lies in the "process" dependency. While version 4.3.2 relied on "process" in the "~0.5.1" range, version 4.4.0 upgrades this to "^0.11.10". This signifies a move to a more recent and potentially more stable or feature-rich version of the "process" polyfill. Developers using "global" should ensure compatibility with "process" version 0.11.10 or higher in their projects. This may offer improved compatibility for modern versions of Node, web browsers, and other environments that rely on "process" for environment-specific behavior.
Both versions maintain their MIT license, use "min-document" at version "^2.19.0" and "tape" for development. The core functionality and approach of the library - providing accessible global variables - remain the same. The file count in the distributed package is eight, with an unpacked size around 3.5KB for version 4.4.0. This makes it a lightweight and efficient module for accessing global scope. If you are already using it or are thinking about using it remember to check dependency versions to avoid any unforseen issues.
All the vulnerabilities related to the version 4.4.0 of the package
min-document vulnerable to prototype pollution
A vulnerability exists in the 'min-document' package prior to version 2.19.0, stemming from improper handling of namespace operations in the removeAttributeNS method. By processing malicious input involving the proto property, an attacker can manipulate the prototype chain of JavaScript objects, leading to denial of service or arbitrary code execution. This issue arises from insufficient validation of attribute namespace removal operations, allowing unintended modification of critical object prototypes. The vulnerability remains unaddressed in the latest available version.