CVE-2022-24847: Gs main Improper Input Validation Vulnerability
HIGHCVE-2022-24847 is a HIGH (CVSS 7.2) improper input validation vulnerability (CWE-917: Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')) affecting Gs main libraries in the Maven ecosystem. The issue involves improper input validation in geoserver. Remediation is available by upgrading affected packages to version 2.20.4, 2.19.6.
CVE-2022-24847 at a Glance
Security Impact
CVSS: 7.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2022-24847
To remediate this vulnerability, upgrade all affected Gs main 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.geoserver</groupId>
<artifactId>gs-main</artifactId>
<version>2.20.4</version>
</dependency>
<dependency>
<groupId>org.geoserver</groupId>
<artifactId>gs-main</artifactId>
<version>2.19.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.geoserver
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2022-24847, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.geoserver
Analyze the terminal output to locate any version of Gs main in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.20.4), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.geoserver 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-917: Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection'), where the product constructs all or part of an expression language (el) statement in a framework such as a java server page (jsp) using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended el statement before it is executed. In Gs main, 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-24847 Affected Gs main Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.geoserver:gs-main
|
Maven |
≥ 2.20.0
< 2.20.4
|
2.20.4
|
|
org.geoserver:gs-main
|
Maven |
< 2.19.6
|
2.19.6
|
References
Frequently Asked Questions
What is CVE-2022-24847?
Which Gs main versions are affected?
What version fixes CVE-2022-24847?
Is gs-main affected?
What is the CVSS score of CVE-2022-24847?
What CWE is associated with CVE-2022-24847?
How can I check Maven dependencies for CVE-2022-24847?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4pm3-f52j-8ggh",
"modified" : "2022-04-22T20:39:10Z",
"published" : "2022-04-22T20:39:10Z",
"aliases" : [ "CVE-2022-24847" ],
"summary" : "Improper Input Validation in GeoServer",
"details" : "### Impact\nThe GeoServer security mechanism can perform an unchecked JNDI lookup, which in turn can be used to perform class deserialization and result in arbitrary code execution. The same can happen while configuring data stores with data sources located in JNDI, or while setting up the disk quota mechanism.\nIn order to perform any of the above changes, the attack needs to have obtained admin rights and use either the GeoServer GUI, or its REST API.\n\n### Patches\nThe lookups are going to be restricted in GeoServer 2.21.0, 2.20.4, 2.19.6.\n\n### Workarounds\nProtection can be achieved by making the GUI (``geoserver/web``), the REST configuration (``geoserver/rest``) and the embedded GeoWebCache configuration (``geoserver/gwc/rest``) unreachable from remote hosts, in addition to protecting access to the file system where the GeoServer configuration is stored.\n\n\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.geoserver:gs-main"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.20.0"
}, {
"fixed" : "2.20.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.geoserver:gs-main"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.19.6"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/geoserver/geoserver/security/advisories/GHSA-4pm3-f52j-8ggh"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-24847"
}, {
"type" : "WEB",
"url" : "https://github.com/geoserver/geoserver/commit/b94a69943992df999d627b21a4ed056fad4569f8"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/geoserver/geoserver"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20", "CWE-917" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-04-22T20:39:10Z",
"nvd_published_at" : "2022-04-13T22:15:00Z"
}
}