{"vuid":"VU#719225","idnumber":"719225","name":"Apache Struts2 ClassLoader allows access to class properties via request parameters","keywords":["apache","struts2","classloader","class"],"overview":"Apache Struts2 2.3.16.1 and earlier contain a vulnerability where the ClassLoader allows access to class properties via request parameters","clean_desc":"Apache Struts2 2.3.16.1 and earlier contain a vulnerability where the ClassLoader allows access to class properties via request parameters. This vulnerability was previously attempted to be addressed in S2-020 ClassLoader manipulation via request parameters. Unfortunately, the correction wasn't sufficient. Struts2 provides a mapping between Web parameters and Java methods. So an attacker could invoke a specific method on a remote Java server by specifying it in a URL. All Java objects have a getClass() method, which returns the object's Class (this object represents classes). Every Class has a ClassLoader, which is the class that loaded the initial class; an attacker could access the ClassLoader using the Class.getClassLoader() method.","impact":"An unauthenticated attacker could manipulate the ClassLoader into disclosing private Class information or possibly load a malicious class file.","resolution":"Update The Apache Struts group has released Struts 2.3.16.2 as a \"General Availability\" release to address this vulnerability. The Apache Struts group is advising all developers to update.","workarounds":"The vendor has stated the following workaround: A security fix release fully addressing this issue is in preparation and will be released as soon as possible. Once the release is available, all Struts2 users are strongly recommended to update their installations. In your struts.xml, replace all custom references to params-interceptor with the following code, especially regarding the class-pattern found at the beginning of the excludeParams list: <interceptor-ref name=\"params\"> <param name=\"excludeParams\"> (.*\\.|^|.*|\\[('|\") )(c|C)lass(\\.|('|\")]|\\[).*,^dojo\\..*,^struts\\..*,^session\\..*,^request\\..*,^application\\..*,^servlet(Request|Response)\\..*,^parameters\\..*,^action:.*,^method:.*</param>\n</interceptor-ref> If you are using default interceptor stacks packaged in struts-default.xml, change your parent packages to a customized secured configuration as in the following example. Given you are using defaultStack so far, change your packages from <package name=\"default\" namespace=\"/\" extends=\"struts-default\"> <default-interceptor-ref name=\"defaultStack\" /> </package> to <package name=\"default\" namespace=\"/\" extends=\"struts-default\"> <interceptors> <interceptor-stack name=\"secureDefaultStack\"> <interceptor-ref name=\"defaultStack\"> <param name=\"params.excludeParams\"> (.*\\.|^|.*|\\[('|\") )(c|C)lass(\\.|('|\")]|\\[).*,^dojo\\..*,^struts\\..*,^session\\..*,^request\\..*,^application\\..*,^servlet(Request|Response)\\..*,^parameters\\..*,^action:.*,^method:.*</param>\n            </interceptor-ref>\n        </interceptor-stack>\n    </interceptors> <default-interceptor-ref name=\"secureDefaultStack\" /> </package>","sysaffected":"","thanks":"This vulnerability was publicly reported by \nApache Struts2","author":"This document was written by Michael Orlando and David Svoboda.","public":["http://struts.apache.org/announce.html#a20140424","http://blog.trendmicro.com/trendlabs-security-intelligence/chinese-underground-creates-tool-exploiting-apache-struts-vulnerability/"],"cveids":["CVE-2014-0094"],"certadvisory":"","uscerttechnicalalert":null,"datecreated":"2014-04-24T21:02:27Z","publicdate":"2014-04-24T00:00:00Z","datefirstpublished":"2014-04-25T16:29:59Z","dateupdated":"2014-07-24T21:53:09Z","revision":14,"vrda_d1_directreport":"1","vrda_d1_population":"3","vrda_d1_impact":"3","cam_widelyknown":"0","cam_exploitation":"0","cam_internetinfrastructure":"0","cam_population":"0","cam_impact":"0","cam_easeofexploitation":"0","cam_attackeraccessrequired":"0","cam_scorecurrent":"0","cam_scorecurrentwidelyknown":"0","cam_scorecurrentwidelyknownexploited":"0","ipprotocol":"","cvss_accessvector":"N","cvss_accesscomplexity":"L","cvss_authentication":null,"cvss_confidentialityimpact":"P","cvss_integrityimpact":"P","cvss_availabilityimpact":"P","cvss_exploitablity":null,"cvss_remediationlevel":"OF","cvss_reportconfidence":"C","cvss_collateraldamagepotential":"L","cvss_targetdistribution":"H","cvss_securityrequirementscr":"ND","cvss_securityrequirementsir":"ND","cvss_securityrequirementsar":"ND","cvss_basescore":"7.5","cvss_basevector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","cvss_temporalscore":"6.5","cvss_environmentalscore":"6.86048806962325","cvss_environmentalvector":"CDP:L/TD:H/CR:ND/IR:ND/AR:ND","metric":0.0,"vulnote":null}