Vulnerabilities in pkg:maven/org.apache.derby/derby

PACKAGE
Advisory Identifier: GHSA-rcjc-c4pj-xxrp
Advisory Summary

CVE-2022-46337 is a CRITICAL (CVSS 9.8) ldap injection vulnerability vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Apache Derby libraries in the Maven ecosystem. The issue involves ldap injection vulnerability in authenticator. Remediation is available by upgrading affected packages to version 10.14.2.1, 10.16.1.2, 10.15.2.1.

7 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.apache.derby/derby

7 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.apache.derby/derby. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-rcjc-c4pj-xxrp CVE-2022-46337 CRITICAL Apache Derby: LDAP injection vulnerability in authenticator
GHSA-v7cq-pq7v-mh5v CVE-2006-7217 MODERATE Apache Derby SQL Injection
GHSA-xprw-xvvm-vqmv CVE-2010-2232 HIGH Improper Access Control in Apache Derby
GHSA-wr69-g62g-2r9h CVE-2015-1832 CRITICAL Improper Restriction of XML External Entity Reference in Apace Derby
GHSA-42xw-p62x-hwcf CVE-2018-1313 MODERATE Improper Access Control in Apache Derby
GHSA-fh32-35w2-rxcc CVE-2009-4269 MODERATE Use of Password Hash With Insufficient Computational Effort in Apache Derby
GHSA-rp7r-79rm-2758 CVE-2005-4849 MODERATE Apache Derby exposes user and password attributes

CVE-2022-46337 at a Glance

CVE Identifier CVE-2022-46337
GHSA Identifier GHSA-rcjc-c4pj-xxrp
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Apache Derby
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2022-46337

To remediate this vulnerability, upgrade all affected Apache Derby dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.apache.derby:derby fixed: Latest secure release
<dependency>
    <groupId>org.apache.derby</groupId>
    <artifactId>derby</artifactId>
    <version>Latest secure release</version>
</dependency>
org.apache.derby:derby fixed: Latest secure release
<dependency>
    <groupId>org.apache.derby</groupId>
    <artifactId>derby</artifactId>
    <version>Latest secure release</version>
</dependency>
org.apache.derby:derby fixed: Latest secure release
<dependency>
    <groupId>org.apache.derby</groupId>
    <artifactId>derby</artifactId>
    <version>Latest secure release</version>
</dependency>
org.apache.derby:derby fixed: Latest secure release
<dependency>
    <groupId>org.apache.derby</groupId>
    <artifactId>derby</artifactId>
    <version>Latest secure release</version>
</dependency>
org.apache.derby:derby fixed: Latest secure release
<dependency>
    <groupId>org.apache.derby</groupId>
    <artifactId>derby</artifactId>
    <version>Latest secure release</version>
</dependency>
org.apache.derby:derby fixed: Latest secure release
<dependency>
    <groupId>org.apache.derby</groupId>
    <artifactId>derby</artifactId>
    <version>Latest secure release</version>
</dependency>
org.apache.derby:derby fixed: Latest secure release
<dependency>
    <groupId>org.apache.derby</groupId>
    <artifactId>derby</artifactId>
    <version>Latest secure release</version>
</dependency>
org.apache.derby:derby fixed: Latest secure release
<dependency>
    <groupId>org.apache.derby</groupId>
    <artifactId>derby</artifactId>
    <version>Latest secure release</version>
</dependency>
org.apache.derby:derby fixed: Latest secure release
<dependency>
    <groupId>org.apache.derby</groupId>
    <artifactId>derby</artifactId>
    <version>Latest secure release</version>
</dependency>
org.apache.derby:derby fixed: Latest secure release
<dependency>
    <groupId>org.apache.derby</groupId>
    <artifactId>derby</artifactId>
    <version>Latest secure release</version>
</dependency>
org.apache.derby:derby fixed: Latest secure release
<dependency>
    <groupId>org.apache.derby</groupId>
    <artifactId>derby</artifactId>
    <version>Latest secure release</version>
</dependency>
org.apache.derby:derby fixed: Latest secure release
<dependency>
    <groupId>org.apache.derby</groupId>
    <artifactId>derby</artifactId>
    <version>Latest secure release</version>
</dependency>
org.apache.derby:derby fixed: Latest secure release
<dependency>
    <groupId>org.apache.derby</groupId>
    <artifactId>derby</artifactId>
    <version>Latest secure release</version>
</dependency>
org.apache.derby:derby fixed: 10.14.2.1
<dependency>
    <groupId>org.apache.derby</groupId>
    <artifactId>derby</artifactId>
    <version>10.14.2.1</version>
</dependency>
org.apache.derby:derby fixed: 10.16.1.2
<dependency>
    <groupId>org.apache.derby</groupId>
    <artifactId>derby</artifactId>
    <version>10.16.1.2</version>
</dependency>
org.apache.derby:derby fixed: 10.15.2.1
<dependency>
    <groupId>org.apache.derby</groupId>
    <artifactId>derby</artifactId>
    <version>10.15.2.1</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.apache.derby

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2022-46337, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.apache.derby

Analyze the terminal output to locate any version of Apache Derby in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 10.14.2.1), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.apache.derby command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Apache Derby, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2022-46337 Affected Apache Derby Versions

16 component(s)
Fixed Versions:
10.14.2.110.16.1.210.15.2.1
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.derby:derby
Maven
≥ 10.1.1.0
≤ 10.1.3.1
org.apache.derby:derby
Maven
≥ 10.2.1.6
≤ 10.2.2.0
org.apache.derby:derby
Maven
≥ 10.3.1.4
≤ 10.3.3.0
org.apache.derby:derby
Maven
≥ 10.4.1.3
≤ 10.4.2.0
org.apache.derby:derby
Maven
≥ 10.5.1.1
≤ 10.5.3.0
org.apache.derby:derby
Maven
≥ 10.6.1.0
≤ 10.6.2.1
org.apache.derby:derby
Maven
10.7.1.1
All 1 versions
10.7.1.1
None specified
org.apache.derby:derby
Maven
≥ 10.8.1.2
≤ 10.8.3.0
org.apache.derby:derby
Maven
10.9.1.0
All 1 versions
10.9.1.0
None specified
org.apache.derby:derby
Maven
≥ 10.10.1.1
≤ 10.10.2.0
org.apache.derby:derby
Maven
10.11.1.1
All 1 versions
10.11.1.1
None specified
org.apache.derby:derby
Maven
10.12.1.1
All 1 versions
10.12.1.1
None specified
org.apache.derby:derby
Maven
10.13.1.1
All 1 versions
10.13.1.1
None specified
org.apache.derby:derby
Maven
≥ 10.14.2.0
< 10.14.2.1
All 1 versions
10.14.2.0
10.14.2.1
org.apache.derby:derby
Maven
≥ 10.16.1.1
< 10.16.1.2
All 1 versions
10.16.1.1
10.16.1.2
org.apache.derby:derby
Maven
≥ 10.15.1.3
< 10.15.2.1
10.15.2.1

References

Frequently Asked Questions

What is CVE-2022-46337?
CVE-2022-46337 is a security vulnerability in Apache Derby involving LDAP injection vulnerability in authenticator under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Apache Derby versions are affected?
Affected versions include releases prior to 10.14.2.1, 10.16.1.2, 10.15.2.1 across affected packages: org.apache.derby:derby.
What version fixes CVE-2022-46337?
Upgrading to 10.14.2.1, 10.16.1.2, 10.15.2.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is derby affected?
Yes, org.apache.derby:derby is affected in releases prior to Latest secure release, 10.14.2.1, 10.16.1.2, 10.15.2.1. Upgrade your dependency to Latest secure release, 10.14.2.1, 10.16.1.2, 10.15.2.1 or later.
What is the CVSS score of CVE-2022-46337?
CVE-2022-46337 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2022-46337?
CVE-2022-46337 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check Maven dependencies for CVE-2022-46337?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.derby'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-rcjc-c4pj-xxrp",
  "modified" : "2026-07-02T21:42:16Z",
  "published" : "2023-11-20T09:30:31Z",
  "aliases" : [ "CVE-2022-46337" ],
  "summary" : "Apache Derby: LDAP injection vulnerability in authenticator",
  "details" : "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.\n\nMitigation:\n\nUsers should upgrade to Java 21 and Derby 10.17.1.0.\n\nAlternatively, 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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.derby:derby"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.1.1.0"
      }, {
        "last_affected" : "10.1.3.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.derby:derby"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.2.1.6"
      }, {
        "last_affected" : "10.2.2.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.derby:derby"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.3.1.4"
      }, {
        "last_affected" : "10.3.3.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.derby:derby"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.4.1.3"
      }, {
        "last_affected" : "10.4.2.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.derby:derby"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.5.1.1"
      }, {
        "last_affected" : "10.5.3.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.derby:derby"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.6.1.0"
      }, {
        "last_affected" : "10.6.2.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.derby:derby"
    },
    "versions" : [ "10.7.1.1" ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.derby:derby"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.8.1.2"
      }, {
        "last_affected" : "10.8.3.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.derby:derby"
    },
    "versions" : [ "10.9.1.0" ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.derby:derby"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.10.1.1"
      }, {
        "last_affected" : "10.10.2.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.derby:derby"
    },
    "versions" : [ "10.11.1.1" ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.derby:derby"
    },
    "versions" : [ "10.12.1.1" ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.derby:derby"
    },
    "versions" : [ "10.13.1.1" ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.derby:derby"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.14.2.0"
      }, {
        "fixed" : "10.14.2.1"
      } ]
    } ],
    "versions" : [ "10.14.2.0" ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.derby:derby"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.16.1.1"
      }, {
        "fixed" : "10.16.1.2"
      } ]
    } ],
    "versions" : [ "10.16.1.1" ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.derby:derby"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.15.1.3"
      }, {
        "fixed" : "10.15.2.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 10.15.2.0"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-46337"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/derby"
  }, {
    "type" : "WEB",
    "url" : "https://issues.apache.org/jira/browse/DERBY-7147"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/q23kvvtoohgzwybxpwozmvvk17rp0td3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-74", "CWE-94" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-11-20T23:26:35Z",
    "nvd_published_at" : "2023-11-20T09:15:07Z"
  }
}