CVE-2006-7217: Derby SQL Injection Vulnerability
MODERATECVE-2006-7217 is a MODERATE sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Derby libraries in the Maven ecosystem. The issue involves apache derby sql injection. Remediation is available by upgrading affected packages to version 10.2.1.6.
CVE-2006-7217 at a Glance
How to Fix CVE-2006-7217
To remediate this vulnerability, upgrade all affected 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.
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.2.1.6</version>
</dependency>
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-2006-7217, 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 Derby in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 10.2.1.6), 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-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In 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
CVE-2006-7217 Affected Derby Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.derby:derby
|
Maven |
< 10.2.1.6
|
10.2.1.6
|
References
Frequently Asked Questions
What is CVE-2006-7217?
Which Derby versions are affected?
What version fixes CVE-2006-7217?
Is derby affected?
What CWE is associated with CVE-2006-7217?
How can I check Maven dependencies for CVE-2006-7217?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v7cq-pq7v-mh5v",
"modified" : "2024-02-12T16:48:29Z",
"published" : "2022-05-01T07:45:41Z",
"aliases" : [ "CVE-2006-7217" ],
"summary" : "Apache Derby SQL Injection",
"details" : "Apache Derby before 10.2.1.6 does not determine schema privilege requirements during the DropSchemaNode bind phase, which allows remote authenticated users to execute arbitrary drop schema statements in SQL authorization mode.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.derby:derby"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "10.2.1.6"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2006-7217"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/derby/commit/28c633d82a776c90fd1cd835a0b66d1c8916d31a"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apache/derby"
}, {
"type" : "WEB",
"url" : "https://svn.apache.org/viewvc?view=revision&revision=449869"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20090406213028/http://www.novell.com/linux/security/advisories/suse_security_summary_report.html"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20200301122517/https://issues.apache.org/jira/browse/DERBY-1858"
}, {
"type" : "WEB",
"url" : "http://db.apache.org/derby/releases/release-10.2.1.6.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-89" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-02-12T16:48:29Z",
"nvd_published_at" : "2007-07-05T20:30:00Z"
}
}