CVE-2023-32200: Apache Jena Expression Language Injection vulnerability

org.apache.jena:jena Updated 02 Oct 2025

Summary

12/07/2023
Yes i
High
8.8

CVE-2023-32200: Apache Jena Expression Language Injection vulnerability. Affects org.apache.jena:jena versions >= 3.7.0, < 4.9.0. Fixed in 4.9.0. How to fix ↓

Also tracked for

The same CVE-2023-32200 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Apache Jena is an open-source Java framework for building Semantic Web and Linked Data applications. It provides a set of APIs and tools for working with RDF (Resource Description Framework) data. The vulnerability in Apache Jena versions 4.8.0 and earlier allows for Expression Language Injection. This vulnerability arises due to insufficient restrictions on called script functions. An attacker can exploit this vulnerability by executing JavaScript code through a SPARQL query. The issue affects Apache Jena versions 3.7.0 through 4.8.0.

Vulnerability Detail

The Apache Jena Expression Language Injection vulnerability allows a remote user to execute JavaScript code via a SPARQL query. This can lead to various security risks, including unauthorized access, data manipulation, and remote code execution. The vulnerability arises from the lack of proper validation and restriction of called script functions. It is important to note that this vulnerability affects Apache Jena versions 3.7.0 through 4.8.0.

How To Fix

Minimum fixed version

4.9.0

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, it is advised to sanitize and validate user input before using it in SPARQL queries. Implementing proper input validation and sanitization can help prevent the execution of malicious JavaScript code. Here is an example of how to sanitize user input in Java:

String userInput = ...; // User input

// Sanitize user input
String sanitizedInput = userInput.replaceAll("[^"]", "");

By removing any potentially harmful characters from the user input, the risk of Expression Language Injection can be mitigated.

Conclusion

The Apache Jena Expression Language Injection vulnerability poses a significant security risk, allowing remote execution of JavaScript code. It is crucial to upgrade to Apache Jena version 4.9.0 or later to address this vulnerability. Implementing input validation and sanitization can provide temporary mitigation. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.apache.jena:jena →

Share this vulnerability

FAQ

Apache Jena is an open-source Java framework for building Semantic Web and Linked Data applications. It provides APIs and tools for working with RDF data.

Expression Language Injection is a vulnerability that allows an attacker to execute arbitrary code by injecting malicious expressions into an application that uses expression language.

The vulnerability in Apache Jena arises from insufficient restrictions on called script functions. An attacker can exploit this by executing JavaScript code through a SPARQL query.

The risks of this vulnerability include unauthorized access, data manipulation, and remote code execution. An attacker can exploit the vulnerability to perform malicious actions on the affected system.

To mitigate the vulnerability, it is recommended to upgrade to Apache Jena version 4.9.0 or later. Additionally, implementing proper input validation and sanitization can help prevent the execution of malicious JavaScript code.

Related vulnerabilities

Recent vulnerabilities recorded for org.apache.jena:jena.

How To Fix

Minimum fixed version

4.9.0

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback