# CVE-2022-24816: OSGeo GeoServer JAI-EXT Code Injection

> Attackers can execute arbitrary code via Jiffle scripts in applications using jai-ext, requiring network access to script submission.

- **Severity:** Critical 10.0 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H`)
- **Exploited in the wild:** Yes, since 26 Jun 2024 (CISA KEV)
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 13 Apr 2022
- **Updated:** 21 Oct 2025
- **Also known as:** GHSA-v92f-jx6p-73rx

## What is CVE-2022-24816?

CVE-2022-24816 is a critical code injection vulnerability in geosolutions-it jai-ext, published on 13 Apr 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

JAI-EXT is an open-source project which aims to extend the Java Advanced Imaging (JAI) API. Programs allowing Jiffle script to be provided via network request can lead 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.2.22 will contain a patch that disables the ability to inject malicious code into the resulting script. Users unable to upgrade may negate the ability to compile Jiffle scripts from the final application, by removing janino-x.y.z.jar from the classpath.

Weakness: CWE-94 (Improper Control of Generation of Code)

## Which versions are affected by CVE-2022-24816?

4 open source packages ship an affected version, including it.geosolutions.jaiext.jiffle:jt-jiffle and it.geosolutions.jaiext.jiffle:jt-jiffle-language. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `it.geosolutions.jaiext.jiffle:jt-jiffle` | Maven | All versions | 1.1.22 |
| `it.geosolutions.jaiext.jiffle:jt-jiffle` | Maven | All versions | 1.1.22 |
| `it.geosolutions.jaiext.jiffle:jt-jiffle-language` | Maven | All versions | 1.1.22 |
| `it.geosolutions.jaiext.jiffle:jt-jiffle-language` | Maven | All versions | 1.1.22 |

Products: Geosolutionsgroup Jai-Ext.

## How do I fix CVE-2022-24816?

Upgrade it.geosolutions.jaiext.jiffle:jt-jiffle to 1.1.22 or later. US federal agencies must fix it by 17 Jul 2024.

## Is CVE-2022-24816 being exploited?

Yes. Attackers have exploited CVE-2022-24816 in the wild since at least 26 Jun 2024.

Public exploit code:

- https://github.com/c1ph3rbyt3/CVE-2022-24816 (github_poc): https://github.com/c1ph3rbyt3/CVE-2022-24816
- GeoServer <1.2.2 - Remote Code Execution (nuclei): http/cves/2022/CVE-2022-24816.yaml

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-24816 and fix it if it is affected.

What it is: CVE-2022-24816 is a critical code injection vulnerability in geosolutions-it jai-ext, published on 13 Apr 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: Yes. Attackers have exploited CVE-2022-24816 in the wild since at least 26 Jun 2024.

Affected packages and fixed versions:
- it.geosolutions.jaiext.jiffle:jt-jiffle (Maven): affected all versions; fixed in 1.1.22
- it.geosolutions.jaiext.jiffle:jt-jiffle (Maven): affected all versions; fixed in 1.1.22
- it.geosolutions.jaiext.jiffle:jt-jiffle-language (Maven): affected all versions; fixed in 1.1.22
- it.geosolutions.jaiext.jiffle:jt-jiffle-language (Maven): affected all versions; fixed in 1.1.22

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2022-24816/ (Markdown: https://insights.sbomify.com/CVE-2022-24816/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2022-24816
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2022-24816
- OSV: https://osv.dev/vulnerability/CVE-2022-24816

---
From sbomify Insights: https://insights.sbomify.com/CVE-2022-24816/
Summaries are generated and may contain mistakes; the official description above is the record.
