connect@1.4.1 vulnerabilities

High performance middleware framework

  • latest version

    3.7.0

  • latest non vulnerable version

  • first published

    13 years ago

  • latest version published

    5 years ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the connect package. This does not include vulnerabilities belonging to this package’s dependencies.

    How to fix?

    Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.

    Fix for free
    VulnerabilityVulnerable Version
    • M
    Cross-site Scripting (XSS)

    connect is a stack of middleware that is executed in order in each request.

    Affected versions of this package are vulnerable to Cross-site Scripting (XSS). 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.

    Due to improper user input sanitization, the 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.

    How to fix Cross-site Scripting (XSS)?

    Upgrade connect to version 2.8.2 or higher.

    <2.8.2
    • M
    Denial of Service (DoS)

    connect is a high performance middleware framework.

    Affected versions of the package are vulnerable to Denial of Service (DoS) attacks. It is possible to crash the node server by requesting a url with a trailing backslash in the end.

    How to fix Denial of Service (DoS)?

    Upgrade connect to version 2.0.0 or higher.

    >=1.4.0 <2.0.0
    • M
    Cross-site Scripting (XSS)

    connect is a stack of middleware that is executed in order in each request.

    Affected versions of this package are vulnerable to Cross-site Scripting (XSS). 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> /
    

    Mitigation factors

    Update to version 2.8.2 or disable methodOverride. It is not possible to avoid the vulnerability if you have enabled this middleware in the top of your stack.

    History

    How to fix Cross-site Scripting (XSS)?

    Upgrade connect to version 2.8.2 or higher.

    <2.8.2