Bug 1091166 (CVE-2013-7370)

Summary: CVE-2013-7370 nodejs-connect: XSS via HTTP request with a crafted method containing JavaScript
Product: [Other] Security Response Reporter: Kurt Seifried <kseifried>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: bleanhar, ccoleman, dmcphers, jdetiber, jialiu, jkeck, jrusnack, kseifried, lmeyer, mmcgrath, tchollingsworth
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-15 04:59:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1091167, 1091168    
Bug Blocks: 1091169    

Description Kurt Seifried 2014-04-25 05:23:59 UTC
The Node Security Project reports:

methodOverride Middleware Reflected Cross-Site Scripting

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.

===

nodejs-connect 2.8.0 is vulnerable to this, an incomplete fix was applied, 
version 2.8.1 is also vulnerable, versions 2.8.2 and later have been corrected.

Please note that the first attempt to fix this was not complete and requires a
second fix:

First fix: https://github.com/senchalabs/connect/commit/277e5aad6a95d00f55571a9a0e11f2fa190d8135
Second fix: https://github.com/senchalabs/connect/commit/126187c4e12162e231b87350740045e5bb06e93a

The incomplete fix for this resulted in a second vulnerability referred to as 
CVE-2013-7371.

External references:
https://nodesecurity.io/advisories/methodOverride_Middleware_Reflected_Cross-Site_Scripting
https://github.com/senchalabs/connect/issues/831
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744374
http://seclists.org/oss-sec/2014/q2/151

Comment 3 Kurt Seifried 2014-08-15 04:59:15 UTC
Statement:

This issue affects the versions of nodejs-connect as shipped with Red Hat OpenShift Enterprise 2. Red Hat Product Security has rated this issue as having Moderate security impact. A future update may address this issue. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.