CVE-2023-35042 — gs-wms
CRITICALCVE-2023-35042 is a critical-severity (CVSS 9.8) remote code execution vulnerability in org.geoserver:gs-wms. 1 public exploit reference exists, so weaponization risk is real. A fix is available for org.geoserver:gs-wms — see the affected versions and patch details below.
GeoServer RCE due to improper control of generation of code in jai-ext`Jiffle` map algebra language
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- A successful exploit gives an attacker total control of the affected component, not partial access.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2023-35042.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
CVE-2023-35042 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 377,636 CVEs with a current EPSS score, this one falls in the 10–50% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
org.geoserver:gs-wms☕org.geoserver:gs-wfs☕org.geoserver:gs-wms☕org.geoserver:gs-wfs☕org.geoserver:gs-wms☕org.geoserver:gs-wfs☕org.geoserver:gs-wps☕org.geoserver:gs-wps+1 moreReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
GeoServer 2, in some configurations, allows remote attackers to execute arbitrary code via java.lang.Runtime.getRuntime().exec in wps:LiteralData within a wps:Execute request, as exploited in the wild in June 2023.
RCE in Jiffle
The Jiffle map algebra language, provided by jai-ext, allows efficiently execute map algebra over large images. A vulnerability CVE-2022-24816 has been recently found in Jiffle, that allows a Code Injection to be performed by properly crafting a Jiffle invocation.
In the case of GeoServer, the injection can be performed from a remote request.
Assessment
GeoTools includes the Jiffle language as part of the gt-process-raster-<version> module, applications using it should check whether it’s possible to provide a Jiffle script from remote, and if so, upgrade or remove the functionality (see also the GeoServer mitigation, below).
The issue is of particular interest for GeoServer users, as GeoServer embeds Jiffle in the base WAR package. Jiffle is available as a OGC function, for usage in SLD rendering transformations.
This allows for a Remote Code Execution in properly crafted OGC requests, as well as from the administration console, when editing SLD files.
Mitigations
In case you cannot upgrade at once, then the following mitigation is strongly recommended:
- Stop GeoServer
- Open the war file, get into
WEB-INF/liband remove thejanino-<version>.jar - Restart GeoServer.
This effectively removes the Jiffle ability to compile scripts in Java code, from any of the potential attack vectors (Janino is the library used to turn the Java code generated from the Jiffle script, into executable bytecode).
GeoServer should still work properly after the removal, but any attempt to use Jiffle will result in an exception.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.geoserver:gs-wms | all versions | 2.18.6org.geoserver:gs-wms:2.18.6 |
| ☕Maven | org.geoserver:gs-wfs | all versions | 2.18.6org.geoserver:gs-wfs:2.18.6 |
| ☕Maven | org.geoserver:gs-wms | ≥ 2.19.0&&< 2.19.6 | 2.19.6org.geoserver:gs-wms:2.19.6 |
| ☕Maven | org.geoserver:gs-wfs | ≥ 2.19.0&&< 2.19.6 | 2.19.6org.geoserver:gs-wfs:2.19.6 |
| ☕Maven | org.geoserver:gs-wms | ≥ 2.20.0&&< 2.20.4 | 2.20.4org.geoserver:gs-wms:2.20.4 |
| ☕Maven | org.geoserver:gs-wfs | ≥ 2.20.0&&< 2.20.4 | 2.20.4org.geoserver:gs-wfs:2.20.4 |
Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.geoserver:gs-wms, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.geoserver:gs-wms to 2.18.6 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2023-35042 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2023-35042 can be triaged on real exposure rather than presence alone.
Tailored to CVE-2023-35042. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is CVE-2023-35042 in your dependencies?
O3 Security finds CVE-2023-35042 across Maven dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.