Red Hat JBoss Application Server insecure deserialization vulnerability


The JBoss Enterprise Application Platform is a subscription-based/open-source Java EE-based application server runtime platform used for building, deploying, and hosting highly-transactional Java applications and services.

Written by Java, the EAP supports a feature called serialization, which allows Java objects to be packed into a byte stream, and be deserializing by another Java application (such as applet). The methods of writeObject()/writeExternal() and readObject()/readExternal() from Serializable interface are used for serializing and deserializing.

An insecure deserialization vulnerability exists in Red Hat JBoss Application Server. When an URI starts with “/invoker/readonly”, it will be handled by a class called ReadOnlyAccessFilter inside http-invoker.sar, more specifically, by the function doFilter(). However, the deserializing process failed to do validation on the object. That allows an attacker could include malicious data to call an exploitable library in the code path, triggering a remote code execution vulnerability. A successful attack will lead to arbitrary code execution in the security context of the root/system user.

 public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)   throws IOException, ServletException {   HttpServletRequest httpRequest = (HttpServletRequest)request;   Principal user = httpRequest.getUserPrincipal();   if ((user == null) && (this.readOnlyContext != null))   {     ServletInputStream sis = request.getInputStream();     ObjectInputStream ois = new ObjectInputStream(sis);     MarshalledInvocation mi = null;     try 	{ 		//Deserialization without filtering 		mi = (MarshalledInvocation)ois.readObject();      }     catch (ClassNotFoundException e)     {       throw new ServletException("Failed to read MarshalledInvocation", e);     }     request.setAttribute("MarshalledInvocation", mi); 

SonicWall Capture Labs Threat Research team has developed the following signature to identify and stop the attacks:

  • IPS 13104: Red Hat JBoss Application Server Insecure Deserialization
Security News
The SonicWall Capture Labs Threat Research Team gathers, analyzes and vets cross-vector threat information from the SonicWall Capture Threat network, consisting of global devices and resources, including more than 1 million security sensors in nearly 200 countries and territories. The research team identifies, analyzes, and mitigates critical vulnerabilities and malware daily through in-depth research, which drives protection for all SonicWall customers. In addition to safeguarding networks globally, the research team supports the larger threat intelligence community by releasing weekly deep technical analyses of the most critical threats to small businesses, providing critical knowledge that defenders need to protect their networks.