CVE-2022-4963: Spring Framework SQL Injection Vulnerability
MODERATECVE-2022-4963 is a MODERATE (CVSS 5.5) sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Spring Framework libraries in the Maven ecosystem. The issue involves sql injection in folio spring module core. Remediation is available by upgrading affected packages to version 2.0.0.
CVE-2022-4963 at a Glance
Security Impact
CVSS: 5.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L).
How to Fix CVE-2022-4963
To remediate this vulnerability, upgrade all affected Spring Framework 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.folio</groupId>
<artifactId>spring-module-core</artifactId>
<version>2.0.0</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.folio
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2022-4963, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.folio
Analyze the terminal output to locate any version of Spring Framework in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.0), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.folio 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 Spring Framework, 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-2022-4963 Affected Spring Framework Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.folio:spring-module-core
|
Maven |
< 2.0.0
|
2.0.0
|
References
Frequently Asked Questions
What is CVE-2022-4963?
Which Spring Framework versions are affected?
What version fixes CVE-2022-4963?
Is spring-module-core affected?
What is the CVSS score of CVE-2022-4963?
What CWE is associated with CVE-2022-4963?
How can I check Maven dependencies for CVE-2022-4963?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4h5h-p23f-hjqf",
"modified" : "2024-03-21T18:58:23Z",
"published" : "2024-03-21T03:36:44Z",
"aliases" : [ "CVE-2022-4963" ],
"summary" : "SQL injection in Folio Spring Module Core",
"details" : "A vulnerability was found in Folio Spring Module Core before 2.0.0. Affected by this issue is the function dropSchema of the file tenant/src/main/java/org/folio/spring/tenant/hibernate/HibernateSchemaService.java of the component Schema Name Handler. The manipulation leads to sql injection. Upgrading to version 2.0.0 is able to address this issue. The name of the patch is d374a5f77e6b58e36f0e0e4419be18b95edcd7ff. It is recommended to upgrade the affected component. The identifier of this vulnerability is VDB-257516.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.folio:spring-module-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-4963"
}, {
"type" : "WEB",
"url" : "https://github.com/folio-org/spring-module-core/pull/39"
}, {
"type" : "WEB",
"url" : "https://github.com/folio-org/spring-module-core/commit/d374a5f77e6b58e36f0e0e4419be18b95edcd7ff"
}, {
"type" : "WEB",
"url" : "https://github.com/folio-org/spring-module-core/releases/tag/v2.0.0"
}, {
"type" : "WEB",
"url" : "https://vuldb.com/?ctiid.257516"
}, {
"type" : "WEB",
"url" : "https://vuldb.com/?id.257516"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-89" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-03-21T18:58:23Z",
"nvd_published_at" : "2024-03-21T02:44:57Z"
}
}