CVE Professor
/
All CVEs
CVE-2026-97893

CVE-2026-97893 — Apache Software Foundation Apache Jena (6.2.0) — CWE-20

HIGH CVSS 7.5 ⚡ EPSS 0.9% NVD

A Denial of Service (DoS) vulnerability exists in the ARQ SPARQL Query Optimiser in Apache Jena ARQ prior to version 6.3.0 that allows a SPARQL query to use that cause excessive memory usage. Users are recommended to upgrade to version 6.3.0, which fixes this issue. Users who are unable to upgrade immediately, especially those who operate a public facing SPARQL service/application backed by Apache Jena are recommended to configure the ARQ symbol arq:optPathFlatten=false in their SPARQL execution context which disables the problematic optimisation.

A Denial of Service (DoS) vulnerability exists in the ARQ SPARQL Query Optimiser in Apache Jena ARQ prior to version 6.3.0 that allows a SPARQL query to use that cause excessive memory usage. Users are recommended to upgrade to version 6.3.0, which fixes this issue. Users who are unable to upgrade immediately, especially those who operate a public facing SPARQL service/application backed by Apache Jena are recommended to configure the ARQ symbol arq:optPathFlatten=false in their SPARQL execution context which disables the problematic optimisation.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. None PR:N
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality None C:N
Integrity None I:N
Availability High A:H
EPSS — Exploit Prediction Scoring System
0.9%
30-day probability
In the 62. percentile of all CVEs — higher exploitation probability than most vulnerabilities.
AI Security Analysis & Remediation

🎯 What is this vulnerability?

This vulnerability is a Denial of Service (DoS) flaw located in the ARQ SPARQL Query Optimiser within Apache Jena. Specifically, it affects versions prior to 6.3.0.

Technical Flaw Analysis:

  • CWE-20 (Improper Input Validation): The core issue is the lack of resource constraints or validation on specific SPARQL query patterns during the optimization phase.

  • Mechanism: The ARQ engine includes an optimization step known as "Path Flattening" (controlled by the symbol arq:optPathFlatten). When a maliciously crafted SPARQL query is submitted, the optimizer attempts to flatten complex path expressions. Due to insufficient bounds on the expansion or memory allocation during this flattening process, the query causes excessive memory usage.

  • Impact: This leads to an Out-Of-Memory (OOM) condition, crashing the Java Virtual Machine (JVM) or causing the application to become unresponsive, thereby denying service to legitimate users.

  • Authentication: None required (PR:N). The vulnerability is exploitable by any user who can submit a SPARQL query to the endpoint.
  • ⚡ Attack Chain

    1. Discovery & Reconnaissance

  • Fingerprinting: An attacker scans for Apache Jena-based SPARQL endpoints. Common default ports are 3030 (Fuseki) or 8080 (if embedded in a web app).
  • Version Identification:
  • * Check HTTP headers for Server: Apache Jena Fuseki/6.2.0. * Query the about endpoint (e.g., GET /about) which often returns JSON-LD containing version information. * If version is not explicitly exposed, assume vulnerability if the service is known to be Jena < 6.3.0.

    2. Exploitation

  • Vector: Network (AV:N), Low Complexity (AC:L), No Privileges Required (PR:N).
  • Payload Construction: The attacker crafts a SPARQL query that triggers the optPathFlatten optimization path in a way that causes unbounded memory allocation.
  • Note: The exact syntactic structure of the malicious query is not publicly detailed in the CVE description. However, it typically involves complex PATH expressions (e.g., (a|b) or nested sequences) that, when flattened by the optimizer, generate an exponentially large intermediate representation.
  • Illustrative PoC (Conceptual):
  • # Illustrative example of a complex path expression that may trigger excessive memory usage
        # during optimization in vulnerable versions. The exact pattern depends on internal optimizer logic.
        SELECT * {
          ?s (a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z)* ?o
        }

    Clarification:* The above is an illustrative example of the vulnerability class (complex path expansion). The actual exploit likely uses a specific combination of path operators that causes the flattening algorithm to allocate memory without limit.

  • Delivery:
  • curl -X POST "http://target:3030/query" \
             -H "Content-Type: application/sparql-query" \
             -d "SELECT * { ?s (a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z)* ?o }"

    3. Post-exploitation

  • Impact: The target service crashes or hangs due to OOM.
  • Persistence: Not applicable (DoS only).
  • Escalation: None. The vulnerability does not lead to code execution or data exfiltration.
  • 🌍 Real World Impact

  • Confidentiality (C:N): No impact. No data is leaked.
  • Integrity (I:N): No impact. No data is modified.
  • Availability (A:H): High Impact. The service becomes unavailable to all users.
  • * Practical Consequences: * Public SPARQL Endpoints: Complete outage of the query service. * Enterprise Applications: If Jena is used as a backend for knowledge graph applications, the entire application may become unresponsive. * Resource Exhaustion: If the JVM is not restarted, it may remain in a degraded state, requiring manual intervention. * Reputational Damage: For public-facing services, a DoS attack can erode user trust.

    🛡️ Remediation & Mitigation

    1. Upgrade (Primary Fix)

  • Affected Versions: Apache Jena ARQ < 6.3.0.
  • Fixed Version: 6.3.0.
  • Action: Upgrade Apache Jena to version 6.3.0 or later.
  • # Example for Maven
        <dependency>
            <groupId>org.apache.jena</groupId>
            <artifactId>apache-jena</artifactId>
            <version>6.3.0</version>
        </dependency>

    2. Workaround (If Upgrade is Not Immediate)

  • Disable Path Flattening Optimization:
  • * Configure the ARQ symbol arq:optPathFlatten to false in the SPARQL execution context. * Implementation: * Fuseki: Add the following to your Fuseki configuration or use a custom Dataset setup:
    // Java code example for disabling the optimization
                QueryExecution qe = QueryExecutionFactory.create(query, dataset);
                qe.getContext().setSymbol(SymbolFactory.create("arq:optPathFlatten"), false);

    * Web Application: If using Jena in a web app, ensure the QueryExecution context is configured with this symbol set to false before executing queries.
    * Note: Disabling this optimization may slightly degrade query performance for complex path queries, but it prevents the DoS.

    3. WAF/ModSecurity Rules

  • Detection: Monitor for SPARQL queries with unusually long or complex PATH expressions.
  • ModSecurity Rule (Example):
  • SecRule REQUEST_BODY "@rx \(\s*[a-zA-Z0-9_]+\s*(\|\s*[a-zA-Z0-9_]+\s*){10,}\)" \
            "id:100001,phase:2,deny,status:403,msg:'Potential SPARQL DoS: Complex Path Expression',log"

    Note:* This rule is heuristic and may produce false positives. Tune the threshold based on your application's normal query patterns.

    4. Detection & IoCs

  • Web Server Logs: Look for POST requests to /query or /update endpoints with large request bodies containing complex SPARQL PATH syntax.
  • Application Logs:
  • * Java OOM errors: java.lang.OutOfMemoryError: Java heap space. * ARQ logs: Exceptions related to query optimization or memory allocation.
  • Network Traffic: High volume of SPARQL queries with similar complex path structures from a single IP.
  • ⚠️ Urgency

  • CVSS Score: 7.5 (HIGH).
  • CISA KEV: No.
  • Exploit Complexity: Low.
  • Priority: High.
* Reasoning: Although not in CISA KEV, the vulnerability is easily exploitable over the network without authentication. Any public-facing SPARQL service is at immediate risk. * Recommendation: 1. Immediate: Apply the workaround (arq:optPathFlatten=false) if you cannot upgrade immediately. 2. Short-term: Upgrade to Apache Jena 6.3.0. 3. Ongoing: Monitor for DoS attempts and tune WAF rules.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="Apache Software Foundation Apache Jena"
CVSS Score
7.5 / 10 · CVSS HIGH
Weakness Types (CWE)
Affected Products (1)
Apache Software Foundation:Apache Jena (6.2.0)
References & Advisories (2)
Related CVEs
9.9
CVE-2026-77526
FacturaScripts is an open source accounting and invoicing software. From version 2025 to before version 2026.3
8.7
CVE-2026-130019
When a table is loaded or committed, Polaris read the table metadata file from the table's own storage and use
7.7
CVE-2026-129974
When a table was renamed into a different namespace, Polaris did not validate the table's stored locations aga
6.1
CVE-2026-130017
When a table is dropped with purge, and when old metadata files are deleted after a commit (write.metadata.del
9.2
CVE-2026-115991
Exposure of sensitive information in the content lock-check endpoints (PUT /api/content/canLock and GET /api/v
8.2
CVE-2026-144623
Micronaut core HTTP client 4.10.24 through 4.10.37 and 5.0.1 through 5.3.0 contains a credential leak vulnerab
7.5
CVE-2026-145069
Zebra zebrad before 7.1.0 and zebra-state before 17.0.0 treat any queued child of the last checkpoint-verified