It was found that in Mojarra, the FacesContext that is made available during application startup is held in a ThreadLocal. The reference is not properly cleaned up in all cases. As a result, if a JSF WAR calls FacesContext.getCurrentInstance() during application startup, another WAR can get access to the leftover context and thus get access to the other WAR's resources.
Upstream bug: http://java.net/jira/browse/JAVASERVERFACES-2436
This issue only affects EAP6/AS7. Older versions are not affected.
Created jboss-jsf-2.1-api tracking bugs for this issue Affects: fedora-17 [bug 830024]
This issue has been resolved upstream in Mojarra 2.1.11 and 2.2-m05. A patch and updated JARs are attached to the upstream bug: http://java.net/jira/browse/JAVASERVERFACES-2436
The upstream Mojarra fix for this issue introduced a class loader leak. An updated patch that resolves both the security issue and the class loader leak will be available in Mojarra 2.1.12.
Acknowledgements: This issue was discovered by Marek Schmidt and Stan Silvert of Red Hat.
This issue has been addressed in following products: JBEAP 6 for RHEL 5 Via RHSA-2012:1591 https://rhn.redhat.com/errata/RHSA-2012-1591.html
This issue has been addressed in following products: JBEAP 6 for RHEL 6 Via RHSA-2012:1592 https://rhn.redhat.com/errata/RHSA-2012-1592.html
This issue has been addressed in following products: JBoss Enterprise Application Platform 6.0.1 Via RHSA-2012:1594 https://rhn.redhat.com/errata/RHSA-2012-1594.html