Send is a Node.js module designed for efficiently serving static files with advanced features like Range requests and conditional-GET support, optimizing bandwidth usage and improving user experience. Comparing versions 0.4.0 and 0.4.1 reveals subtle yet important differences for developers. Both share core functionalities and dependencies, including mime for content-type determination, debug for enhanced logging, fresh for cache validation, finished for stream completion handling, and range-parser for handling byte range requests. The devDependencies highlight testing frameworks like mocha, should for assertions, istanbul for code coverage, and supertest for integration testing.
The most noteworthy change lies in the devDependencies. Version 0.4.1 updates mocha from "~1.19.0" to "~1.20.0" and should from "~3.3.2" to "~4.0.0". This suggests improvements in the testing environment, potentially addressing bugs or enhancing test coverage. While the core dependencies remain the same, the update to testing related dependencies on version 0.4.1 shows that the send package prioritized improvements to the quality assurance process. Developers using Send should consider these improvements when choosing between the two versions, specially if they are using mocha or should in their own development workflow. Both versions are licensed under the permissive MIT license and maintained by TJ Holowaychuk, ensuring reliability and open-source accessibility. The releaseDate also indicates a short period between releases, implying the commitment of the developers to the tool.
All the vulnerabilities related to the version 0.4.1 of the package
Directory Traversal in send
Versions 0.8.3 and earlier of send
are affected by a directory traversal vulnerability. When relying on the root option to restrict file access it may be possible for an application consumer to escape out of the restricted directory and access files in a similarly named directory.
For example, static(_dirname + '/public')
would allow access to _dirname + '/public-restricted'
.
Update to version 0.8.4 or later.
Root Path Disclosure in send
Versions of send
prior to 0.11.2 are affected by an information leakage vulnerability which may allow an attacker to enumerate paths on the server filesystem.
Update to version 0.11.1 or later.
send vulnerable to template injection that can lead to XSS
passing untrusted user input - even after sanitizing it - to SendStream.redirect()
may execute untrusted code
this issue is patched in send 0.19.0
users are encouraged to upgrade to the patched version of express, but otherwise can workaround this issue by making sure any untrusted inputs are safe, ideally by validating them against an explicit allowlist
successful exploitation of this vector requires the following:
mime Regular Expression Denial of Service when MIME lookup performed on untrusted user input
Affected versions of mime
are vulnerable to regular expression denial of service when a mime lookup is performed on untrusted user input.
Update to version 2.0.3 or later.
debug Inefficient Regular Expression Complexity vulnerability
A vulnerability classified as problematic has been found in debug-js debug up to 3.0.x. This affects the function useColors of the file src/node.js. The manipulation of the argument str leads to inefficient regular expression complexity. Upgrading to version 3.1.0 is able to address this issue. The name of the patch is c38a0166c266a679c8de012d4eaccec3f944e685. It is recommended to upgrade the affected component. The identifier VDB-217665 was assigned to this vulnerability. The patch has been backported to the 2.6.x branch in version 2.6.9.
Regular Expression Denial of Service in debug
Affected versions of debug
are vulnerable to regular expression denial of service when untrusted user input is passed into the o
formatter.
As it takes 50,000 characters to block the event loop for 2 seconds, this issue is a low severity issue.
This was later re-introduced in version v3.2.0, and then repatched in versions 3.2.7 and 4.3.1.
Version 2.x.x: Update to version 2.6.9 or later. Version 3.1.x: Update to version 3.1.0 or later. Version 3.2.x: Update to version 3.2.7 or later. Version 4.x.x: Update to version 4.3.1 or later.
Regular Expression Denial of Service in fresh
Affected versions of fresh
are vulnerable to regular expression denial of service when parsing specially crafted user input.
Update to version 0.5.2 or later.