Apache MyFaces Information Disclosure

2012-02-10T00:00:00
ID PACKETSTORM:109631
Type packetstorm
Reporter Leonardo Uribe
Modified 2012-02-10T00:00:00

Description

                                        
                                            `--------------------------------------------------------------------------------------------------  
  
CVE-2011-4367: Apache MyFaces information disclosure vulnerability  
  
Severity: Important  
  
Vendor: The Apache Software Foundation  
  
Versions Affected:  
MyFaces Core 2.0.1 to 2.0.11  
MyFaces Core 2.1.0 to 2.1.5  
Earlier versions are not affected  
  
Description:  
  
MyFaces JavaServer Faces (JSF) allows relative paths in the  
javax.faces.resource 'ln' parameter or writing the url so the resource  
name include '..' sequences . An attacker could use the security  
vulnerability to view files that they should not be able to.  
  
Mitigation:  
  
Users of affected versions should apply one of the following mitigations:  
MyFaces Core 2.0.x users should update to 2.0.12  
MyFaces Core 2.1.x users should update to 2.1.6  
  
Example:  
  
In linux or similar systems:  
  
http://<hostname>:<port>/<context-root>/faces/javax.faces.resource/web.xml?ln=../WEB-INF  
http://<hostname>:<port>/<context-root>/faces/javax.faces.resource/../WEB-INF/web.xml  
  
or in windows systems:  
  
http://<hostname>:<port>/<context-root>/faces/javax.faces.resource/web.xml?ln=..\\WEB-INF  
http://<hostname>:<port>/<context-root>/faces/javax.faces.resource/..\\WEB-INF/web.xml  
  
The 'ln' parameter should not allow a relative path. In the above example  
the contents of the web.xml are displayed in the response to the attacker.  
The part of the url that derive the resource name should not allow '..' as  
valid char sequence.  
  
Credit: Issue reported by Paul Nicolucci thanks to the security team at IBM  
  
References:  
  
--------------------------------------------------------------------------------------------------  
  
regards,  
  
Leonardo Uribe  
`