Connect is a lightweight and high-performance middleware framework, a fundamental building block for Node.js web applications. Examining versions 1.9.1 and 1.9.2 reveals subtle but important aspects for developers. Both share the same core dependencies: qs for query string parsing, mime for handling MIME types, and formidable for form data parsing. The developer dependencies, which are used for testing and development, also remain consistent, featuring tools like expresso for testing, koala, less, and sass for CSS processing, markdown for documentation, ejs for templating, and should for assertions, indicating a stable development environment across these versions.
The primary difference lies in the releaseDate. Version 1.9.2 was released on July 9, 2012, while 1.9.1 was released on June 25, 2012. This three-week gap suggests that version 1.9.2 likely includes bug fixes, performance improvements, or minor enhancements that didn't warrant a major or minor version bump. For developers, this means upgrading to 1.9.2 is generally recommended to benefit from the latest refinements and increased application stability. Given the identical dependency declarations, the upgrade should be seamless for most users, but reviewing any release notes or commit history (available via the repository URL) is always prudent to understand the specific changes incorporated. The absence of updated dependencies suggests a focus on internal improvements and fixes rather than feature additions.
All the vulnerabilities related to the version 1.9.2 of the package
methodOverride Middleware Reflected Cross-Site Scripting in connect
Connect is a stack of middleware that is executed in order in each request.
The "methodOverride" middleware allows the http post to override the method of the request with the value of the "_method" post key or with the header "x-http-method-override".
Because the user post input was not checked, req.method could contain any kind of value. Because the req.method did not match any common method VERB, connect answered with a 404 page containing the "Cannot [method]
[url]
" content. The method was not properly encoded for output in the browser.
###Example:
~ curl "localhost:3000" -d "_method=<script src=http://nodesecurity.io/xss.js></script>"
Cannot <SCRIPT SRC=HTTP://NODESECURITY.IO/XSS.JS></SCRIPT> /
Update to the newest version of Connect or disable methodOverride. It is not possible to avoid the vulnerability if you have enabled this middleware in the top of your stack.
Node Connect Reflected Cross-Site Scripting in Sencha Labs Connect middleware
node-connect before 2.8.2 has cross site scripting in Sencha Labs Connect middleware (vulnerability due to incomplete fix for CVE-2013-7370)
Connect is a stack of middleware that is executed in order in each request.
The "methodOverride" middleware allows the http post to override the method of the request with the value of the "_method" post key or with the header "x-http-method-override".
Because the user post input was not checked, req.method could contain any kind of value. Because the req.method did not match any common method VERB, connect answered with a 404 page containing the "Cannot [method]
[url]
" content. The method was not properly encoded for output in the browser.
~ curl "localhost:3000" -d "_method=<script src=http://nodesecurity.io/xss.js></script>"
Cannot <SCRIPT SRC=HTTP://NODESECURITY.IO/XSS.JS></SCRIPT> /
Update to the newest version of Connect or disable methodOverride. It is not possible to avoid the vulnerability if you have enabled this middleware in the top of your stack.
Sergio Arcos
Cross-Site Scripting in connect
connect node module before 2.14.0 suffers from a Cross-Site Scripting (XSS) vulnerability due to a lack of validation of file in directory.js middleware.