CVE-2023-32200
High · 8.8CVSS
8.8
EPSS
1.5%
Published
Jul 12, 2023
CISA due date
—
Cloudanix analysis
A flaw in Apache Jena lets attackers run their own code on the server simply by sending specially crafted database queries.
- Exploitation
- Remote Authenticated
- Attacker needs
- Low Privilege
- Complexity
- Low
- Impact
- Remote Code Execution
- Component
- Library
- Class
- RCE
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Insufficient restrictions on script functions allow remote execution of JavaScript code via crafted SPARQL queries, leading to arbitrary code execution on the server.
Why it matters to the business
Attackers can fully compromise affected servers to steal data, deploy malware, or disrupt operations; the flaw has been public for over three years with no known fixes listed, increasing long-term exposure risk for any remaining deployments.
How an attack unfolds
An attacker with network access crafts a SPARQL query that invokes restricted script functions to execute JavaScript, bypassing intended controls and achieving remote code execution on the Jena instance.
How to fix it
Upgrade Apache Jena to a version later than 4.8.0 that enforces proper script function restrictions; until upgraded, restrict network access to SPARQL endpoints and disable unnecessary script extensions.
How to confirm the fix worked
Confirm Jena version exceeds 4.8.0; test that attempted script execution via SPARQL queries is rejected and produces access-denied errors rather than executing code.
Typical attack path
- Identify publicly reachable Apache Jena SPARQL endpoint
- Craft SPARQL query containing script invocation payload
- Submit query to execute JavaScript code
- Escalate to full system control or data exfiltration
How to detect it
Inspect SPARQL endpoint logs for queries containing script, javascript, or function invocation patterns that were previously blocked; correlate with successful code execution indicators such as unexpected processes or file writes.
- SPARQL queries containing 'javascript' or script function calls
- Unexpected JavaScript execution artifacts in Jena process logs
What your security team should do
- Prioritize upgrade of all Apache Jena instances beyond 4.8.0
- Implement network segmentation and query allow-listing for SPARQL endpoints
- Monitor for anomalous SPARQL traffic while remediation is pending
- Review downstream dependents and update any packages relying on vulnerable Jena versions
The record
There is insufficient restrictions of called script functions in Apache Jena versions 4.8.0 and earlier. It allows a remote user to execute javascript via a SPARQL query. This issue affects Apache Jena: from 3.7.0 through 4.8.0.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Maven | org.apache.jena:jena | 3.7.0 | 4.9.0 |
| Debian:12 | apache-jena | 0 | No fix |
| Debian:13 | apache-jena | 0 | 4.9.0-1 |
| Ubuntu:22.04:LTS | apache-jena | 0 | No fix |
| Ubuntu:24.04:LTS | apache-jena | 0 | No fix |
| Ubuntu:24.10 | apache-jena | 0 | No fix |
| Ubuntu:25.04 | apache-jena | 0 | No fix |
| Ubuntu:25.10 | apache-jena | 0 | No fix |
| maven | org.apache.jena/jena | 3.7.0 | No fix |
Related vulnerabilities
- CVE-2023-22665 There is insufficient checking of user queries in Apache Jena versions 4.7.0 and earlier… Also affects org.apache.jena:jena
- CVE-2022-28890 A vulnerability in the RDF/XML parser of Apache Jena allows an attacker to cause an… Also affects org.apache.jena:jena
- CVE-2022-45136 Apache Jena SDB 3.17.0 and earlier is vulnerable to a JDBC Deserialisation attack if the… Also affects apache-jena
- CVE-2026-65591 n8n contains a sanitizer bypass vulnerability in the legacy expression evaluator's… CWE-917
- CVE-2026-57281 Jenkins Script Security Plugin 1402.v94c9ce464861 and earlier does not reject Groovy AST… CWE-917
- CVE-2026-11561 Improper neutralization of special elements used in an expression language statement… CWE-917
- CVE-2026-40985 Applications that configure the WebFlowELExpressionParser are vulnerable to the use of… CWE-917
- CVE-2026-41729 Spring Data REST is vulnerable to SpEL expression injection through map-typed properties… CWE-917