Memory Leak Affecting jboss:jboss-client package, versions [0,]


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.11% (45th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Memory Leak vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JAVA-JBOSS-2419064
  • published5 Apr 2022
  • disclosed4 Mar 2022
  • creditByteHackr

Introduced: 4 Mar 2022

CVE-2022-0853  (opens in a new tab)
CWE-401  (opens in a new tab)

How to fix?

There is no fixed version for jboss:jboss-client.

Overview

Affected versions of this package are vulnerable to Memory Leak in remote client transactions, when using UserTransaction repeatedly.

PoC

private void testTransaction() throws Exception {

     for(int i=1; i< 500000; i++) {
       System.out.println("Starting process " + i);

       // get the UserTransaction and EJB Proxy
       Context ctx = getInitialContext(host, port, username, password);
       UserTransaction tx = getUserTransaction(ctx);
       ControllerRemote cr = (ControllerRemote)
ctx.lookup("Controller/Controller" +
"!com.test.usertransaction.ControllerRemote");

       try {
         tx.begin();
       }
       catch(Exception ex1) {
         ex1.printStackTrace();
       }
       //System.out.println("user transaction started");

       cr.mainCall();

       try {
         tx.commit();;
       }
       catch(Exception ex1) {
         ex1.printStackTrace();
         throw ex1;
       }
       //System.out.println("commited user transaction");

       if(ctx != null)
         ctx.close();
     }
   }

CVSS Scores

version 3.1