Cloudanix VulnDB

CVE-2022-46337

Critical · 9.8

CVSS

9.8

EPSS

1.4%

Published

Nov 20, 2023

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A flaw in how some database servers check usernames lets attackers get in without proper approval, potentially filling up storage, running harmful programs, or stealing and changing important information.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Full Compromise
Component
Application
Class
Authentication Bypass
Remediation
Upgrade
Effort
Medium
Patch risk
Medium

What it actually does

Bypass of LDAP authentication via crafted username allows unauthenticated creation of Derby databases, execution of visible malware by the server process, and unauthorized data access or modification in databases lacking SQL GRANT/REVOKE controls.

Why it matters to the business

Attackers can exhaust disk space, run malicious code under the Derby server account, or access and alter sensitive data, leading to service disruption, compliance violations, and potential ransomware or data theft scenarios in LDAP-authenticated deployments.

How an attack unfolds

An attacker supplies a specially crafted username during LDAP authentication to Derby; once the bypass succeeds the attacker creates numerous junk databases to fill storage, executes malware visible to the boot account, or directly views and corrupts data and runs privileged procedures in databases without additional SQL authorization.

How to fix it

Upgrade to Java 21 with Derby 10.17.1.0. For older Java LTS versions, build Derby from the backported 10.16, 10.15, or 10.14 families. Disable LDAP authentication or add SQL GRANT/REVOKE protections until patched.

How to confirm the fix worked

Verify Derby version is 10.17.1.0 or later (or the corresponding backport); attempt LDAP login with known bypass usernames and confirm authentication is rejected; review database creation and authorization logs for anomalies.

Typical attack path

  1. Craft LDAP username that evades authentication checks
  2. Connect to the Derby server and create multiple junk databases
  3. Upload and execute malware visible to the Derby process owner
  4. Query or modify sensitive tables and invoke procedures if SQL controls are absent

How to detect it

Search Derby server logs for repeated database creation attempts from single LDAP principals, unexpected process executions under the Derby account, and queries against sensitive objects without prior GRANT records; correlate with LDAP authentication logs showing unusual usernames.

What your security team should do

  • Immediately upgrade Derby to a fixed release matching the Java version in use
  • Audit all LDAP-authenticated Derby instances for missing SQL authorization controls
  • Monitor disk usage and unexpected database creation events
  • Restrict network access to Derby ports until patches are applied

The record

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.

Affected packages

Ecosystem Package Introduced Fixed
Maven org.apache.derby:derby 10.1.1.0 10.14.3
Maven org.apache.derby:derby 10.15.0.0 10.15.2.1
Maven org.apache.derby:derby 10.16.0.0 10.16.1.2
Maven org.apache.derby:derby 10.17.0.0 10.17.1.0
Chainguard apache-nifi 0 1.26.0-r2
Chainguard apache-nifi 0 2.6.0-r2
Chainguard apache-nifi-compat 0 2.6.0-r2
Chainguard apache-nifi-toolkit 0 2.6.0-r2
Chainguard druid 0 31.0.0-r2
Chainguard druid 0 32.0.1-r1
Chainguard druid-compat 0 31.0.0-r2
Chainguard druid-compat 0 32.0.1-r1
Chainguard hadoop-fips-3.3.6 0 3.3.6-r15
Chainguard logstash-integration-jdbc 0 5.4.8-r0
Chainguard pyspark-scala-2.13 0 3.5.5-r0
Chainguard spark-3.4 0 3.4.3-r2
Chainguard spark-3.4 0 3.4.4-r1
Chainguard spark-3.4-bitnami-compat 0 3.4.3-r2
Chainguard spark-3.4-bitnami-compat 0 3.4.4-r1
Chainguard spark-3.4-compat 0 3.4.3-r2
Chainguard spark-3.4-compat 0 3.4.4-r1
Chainguard spark-3.4-minimal 0 3.4.3-r2
Chainguard spark-3.4-minimal-openjdk-11 0 3.4.4-r1
Chainguard spark-3.4-minimal-openjdk-17 0 3.4.4-r1
Chainguard spark-3.4-minimal-openjdk-8 0 3.4.4-r1
Chainguard spark-3.4-openjdk-11 0 3.4.4-r1
Chainguard spark-3.4-openjdk-17 0 3.4.4-r1
Chainguard spark-3.4-openjdk-8 0 3.4.4-r1
Chainguard spark-3.5 0 3.5.5-r0
Chainguard spark-3.5 0 3.5.7-r2
Chainguard spark-3.5-minimal-openjdk-11 0 3.5.5-r0
Chainguard spark-3.5-minimal-openjdk-17 0 3.5.5-r0
Chainguard spark-3.5-minimal-openjdk-8 0 3.5.5-r0
Chainguard spark-3.5-scala-2.12 0 3.5.7-r2
Chainguard spark-3.5-scala-2.12-bitnami-compat 0 3.5.5-r0
Chainguard spark-3.5-scala-2.12-compat 0 3.5.5-r0
Chainguard spark-3.5-scala-2.12-compat 0 3.5.7-r2
Chainguard spark-3.5-scala-2.12-iamguarded-compat 0 3.5.7-r2
Chainguard spark-3.5-scala-2.12-openjdk-11 0 3.5.5-r0
Chainguard spark-3.5-scala-2.12-openjdk-17 0 3.5.5-r0
Chainguard spark-3.5-scala-2.12-openjdk-8 0 3.5.5-r0
Chainguard spark-3.5-scala-2.13 0 3.5.7-r2
Chainguard spark-3.5-scala-2.13-compat 0 3.5.5-r0
Chainguard spark-3.5-scala-2.13-compat 0 3.5.7-r2
Chainguard spark-3.5-scala-2.13-openjdk-11 0 3.5.5-r0
Chainguard spark-3.5-scala-2.13-openjdk-17 0 3.5.5-r0
Chainguard spark-3.5-scala-2.13-openjdk-8 0 3.5.5-r0
Chainguard spark-4.1 0 4.1.1-r5
Chainguard spark-fips-3.5 0 3.5.4-r17
Chainguard spark-fips-3.5-scala-2.12 0 3.5.4-r17
Chainguard spark-fips-3.5-scala-2.12-compat 0 3.5.4-r17
Chainguard spark-fips-3.5-scala-2.13 0 3.5.4-r17
Chainguard spark-fips-3.5-scala-2.13-compat 0 3.5.4-r17
Debian:11 derby 0 No fix
Debian:12 derby 0 No fix
Debian:13 derby 0 10.14.2.0-3
Ubuntu:16.04:LTS derby 0 No fix
Ubuntu:18.04:LTS derby 0 No fix
Ubuntu:20.04:LTS derby 0 No fix
Ubuntu:22.04:LTS derby 0 No fix
Ubuntu:24.04:LTS derby 0 No fix
Ubuntu:24.10 derby 0 No fix
Ubuntu:25.04 derby 0 No fix
Ubuntu:25.10 derby 0 No fix
Ubuntu:Pro:16.04:LTS derby 0 No fix
Ubuntu:Pro:18.04:LTS derby 0 No fix
Ubuntu:Pro:20.04:LTS derby 0 No fix
Wolfi apache-nifi 0 2.6.0-r2
Wolfi apache-nifi-compat 0 2.6.0-r2
Wolfi apache-nifi-toolkit 0 2.6.0-r2
Wolfi druid 0 31.0.0-r2
Wolfi druid 0 32.0.1-r1
Wolfi druid-compat 0 31.0.0-r2
Wolfi druid-compat 0 32.0.1-r1
Wolfi logstash-integration-jdbc 0 5.4.8-r0
Wolfi pyspark-scala-2.13 0 3.5.5-r0
Wolfi spark-3.5 0 3.5.5-r0
Wolfi spark-3.5 0 3.5.7-r2
Wolfi spark-3.5-minimal-openjdk-11 0 3.5.5-r0
Wolfi spark-3.5-minimal-openjdk-17 0 3.5.5-r0
Wolfi spark-3.5-minimal-openjdk-8 0 3.5.5-r0
Wolfi spark-3.5-scala-2.12 0 3.5.7-r2
Wolfi spark-3.5-scala-2.12-bitnami-compat 0 3.5.5-r0
Wolfi spark-3.5-scala-2.12-compat 0 3.5.5-r0
Wolfi spark-3.5-scala-2.12-compat 0 3.5.7-r2
Wolfi spark-3.5-scala-2.12-iamguarded-compat 0 3.5.7-r2
Wolfi spark-3.5-scala-2.12-openjdk-11 0 3.5.5-r0
Wolfi spark-3.5-scala-2.12-openjdk-17 0 3.5.5-r0
Wolfi spark-3.5-scala-2.12-openjdk-8 0 3.5.5-r0
Wolfi spark-3.5-scala-2.13 0 3.5.7-r2
Wolfi spark-3.5-scala-2.13-compat 0 3.5.5-r0
Wolfi spark-3.5-scala-2.13-compat 0 3.5.7-r2
Wolfi spark-3.5-scala-2.13-openjdk-11 0 3.5.5-r0
Wolfi spark-3.5-scala-2.13-openjdk-17 0 3.5.5-r0
Wolfi spark-3.5-scala-2.13-openjdk-8 0 3.5.5-r0
Wolfi spark-4.1 0 4.1.1-r5
maven org.apache.derby/derby 10.1.1.0 10.17.1.0

Related vulnerabilities