Skip to main content

CVE-2022-46337: LDAP Injection in Apache Software Foundation Apache Derby

Critical
VulnerabilityCVE-2022-46337cvecve-2022-46337
Published: Mon Nov 20 2023 (11/20/2023, 08:49:38 UTC)
Source: CVE Database V5
Vendor/Project: Apache Software Foundation
Product: Apache Derby

Description

A cleverly devised username might bypass LDAP authentication checks. In LDAP-authenticated Derby installations, this could let an attacker fill up the disk by creating junk Derby databases. In LDAP-authenticated Derby installations, this could also allow the attacker to execute malware which was visible to and executable by the account which booted the Derby server. In LDAP-protected databases which weren't also protected by SQL GRANT/REVOKE authorization, this vulnerability could also let an attacker view and corrupt sensitive data and run sensitive database functions and procedures. Mitigation: Users should upgrade to Java 21 and Derby 10.17.1.0. Alternatively, users who wish to remain on older Java versions should build their own Derby distribution from one of the release families to which the fix was backported: 10.16, 10.15, and 10.14. Those are the releases which correspond, respectively, with Java LTS versions 17, 11, and 8.

AI-Powered Analysis

AILast updated: 07/11/2025, 02:46:48 UTC

Technical Analysis

CVE-2022-46337 is a critical LDAP injection vulnerability affecting multiple versions of Apache Derby, a relational database management system developed by the Apache Software Foundation. The vulnerability arises from insufficient sanitization of user input in LDAP authentication mechanisms. Specifically, a maliciously crafted username can bypass LDAP authentication checks, allowing an attacker to perform unauthorized actions within the Derby environment. Exploitation can lead to several severe consequences: an attacker can create numerous junk Derby databases, potentially filling up disk space and causing denial of service due to resource exhaustion. Furthermore, if the Derby server is running under an account with elevated privileges, the attacker could execute malware visible and executable by that account, leading to remote code execution. Additionally, in environments where LDAP authentication is used without complementary SQL GRANT/REVOKE authorization controls, the attacker could view and corrupt sensitive data and execute sensitive database functions and procedures, compromising data confidentiality and integrity. The vulnerability affects a wide range of Apache Derby versions from 10.1.1.0 through 10.16.1.1, spanning multiple Java LTS versions. The CVSS v3.1 base score is 9.8 (critical), reflecting the vulnerability's network attack vector, no required privileges or user interaction, and high impact on confidentiality, integrity, and availability. Mitigation involves upgrading to Java 21 and Derby 10.17.1.0, which contain the fix. For users on older Java versions, building a custom Derby distribution from backported fixed releases (10.14, 10.15, 10.16) corresponding to Java 8, 11, and 17 LTS versions is recommended. No known exploits have been reported in the wild yet, but the severity and ease of exploitation make timely patching imperative.

Potential Impact

For European organizations, the impact of CVE-2022-46337 can be significant, especially for those relying on Apache Derby databases with LDAP authentication. The vulnerability can lead to unauthorized access to sensitive data, data corruption, and potential full system compromise through malware execution. Disk space exhaustion attacks could disrupt critical business applications, causing downtime and operational losses. Industries such as finance, healthcare, government, and telecommunications, which often use LDAP for centralized authentication and may deploy Derby in embedded or standalone modes, are particularly at risk. The ability to bypass authentication without credentials increases the threat landscape, potentially allowing external attackers or malicious insiders to exploit the vulnerability. Given the criticality of data handled by European organizations and strict regulatory requirements like GDPR, exploitation could result in severe compliance violations, financial penalties, and reputational damage. The lack of required privileges or user interaction lowers the barrier for attackers, increasing the likelihood of exploitation if systems remain unpatched.

Mitigation Recommendations

1. Immediate upgrade to Apache Derby version 10.17.1.0 and Java 21 to apply the official fix. 2. For environments unable to upgrade Java, build and deploy custom Derby distributions from the fixed release branches (10.14, 10.15, 10.16) corresponding to their Java LTS version. 3. Implement strict SQL authorization controls (GRANT/REVOKE) in addition to LDAP authentication to limit database access and operations. 4. Monitor Derby server logs for unusual database creation activity or authentication anomalies that could indicate exploitation attempts. 5. Restrict the Derby server process permissions to the minimum necessary, preventing execution of unauthorized code even if the vulnerability is exploited. 6. Employ network segmentation and firewall rules to limit access to Derby servers only to trusted hosts and users. 7. Conduct regular security audits and vulnerability scans focusing on LDAP authentication configurations and Derby deployments. 8. Develop incident response plans that include steps for containment and remediation if exploitation is detected.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
apache
Date Reserved
2022-11-29T16:35:03.918Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 68487f571b0bd07c3938a695

Added to database: 6/10/2025, 6:54:15 PM

Last enriched: 7/11/2025, 2:46:48 AM

Last updated: 7/28/2025, 2:56:07 PM

Views: 15

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats