Designing Safer Semantic APIs After the Fuseki SHACL SSRF
CVE-2026-86155 is a reminder that data APIs can execute more than the schema suggests. Apache Jena Fuseki's SHACL validation endpoint accepts an RDF shapes graph. Affected versions allowed a SPARQL target in that graph to contain SERVICE, which made the server request another endpoint. A safer semantic API has to treat shape input as code with network capability.
The API contract is too narrow
A product description might say that an endpoint validates a graph against SHACL. That sounds like a data quality operation. The implementation also parses SPARQL and can perform federation. The caller's mental model and the server's authority do not match.
When writing a new API or reviewing an existing one, state the executable features explicitly. Does the service allow SPARQL targets? Can a target use SERVICE? Which endpoints may it contact? Does the response include remote data, error text, or timing information? The answers belong in both the threat model and the operator documentation.
Separate parsing from execution
Accept the shapes graph through a controlled parser, then evaluate the parsed structure against a policy. Reject federation nodes when the tenant or operation has no right to network access. A textual search for SERVICE is not enough because RDF can represent the same concept in several syntaxes and query forms.
Keep the execution worker separate from the public API. The worker should have a narrow identity, an explicit outbound policy, and a short lifetime. A validation failure should not leave a long-running process with broad network access or access to unrelated tenant data.
The gateway should enforce who can submit a shape, not only who can call the validation route. If users can create dynamic targets, require a review and deployment step. A reviewed artifact can still be unsafe if a later user can change it after approval, so pin the artifact hash used for each run.
Make the network policy readable
Network controls are easier to verify when they are expressed as named destinations and owners. An allowlist entry for a reporting service should say which tenant and validation job may use it. A wildcard private network rule hides the same exposure that the SSRF bug creates.
Block loopback, link-local, cloud metadata, and management networks from workers that do not need them. Force DNS through a resolver that records queries. If an egress proxy is required, prevent the worker from bypassing it through an environment variable, direct IP address, or alternate route.
Log the source workload, target endpoint, shape artifact, tenant, and outcome together. These fields let the security team distinguish a legitimate data integration from a query that was inserted into an untrusted shapes graph.
Operational review checklist
Ask whether the validation endpoint is enabled, who can reach it, and who can change a shape. Check whether the worker has a dedicated identity and whether its egress rules name specific destinations. Confirm that a shape hash is pinned for each run and that logs retain the hash after the report is produced.
Review the parser version and the deployed library version on every replica. Confirm that the fixed release rejects the federation path and that the network policy blocks an unauthorized destination even if the application layer fails. These checks cover both the known bug and the next configuration mistake around it.
Patch, then improve
Apache Jena Fuseki 6.3.0 is the fixed release. The project states that SERVICE is not permitted in SHACL validation. Upgrade every service that evaluates shapes, including batch jobs that do not appear in the public API inventory.
The 6.3.0 change notes document arq:httpServiceAllowed=false. Use the setting to remove general SPARQL federation from services that do not need it, and test the effective scope. Do not rely on a configuration flag alone when the vulnerable process is still running.
After the patch, add a regression test that a shape requiring a remote service fails closed. Test a direct call, a call through the gateway, and a scheduled validation task. Verify the negative result at both the application and network layers.
Design for the next parser bug
The specific CVE will be fixed, but the architecture lesson remains. Any endpoint that accepts executable RDF, query text, templates, or plugin-like rules needs a capability model. A shape that only declares constraints should not be able to inherit the server's ability to reach every internal service.
Use least privilege for data access, separate worker identities, bounded outbound destinations, and clear review records. Keep the validation service observable enough that a security analyst can reconstruct which input caused which request. These controls help even when the next parser or expression bug is not known yet.
References
- Apache Jena Security Advisories: https://jena.apache.org/security/advisories.html
- Apache Jena SHACL service documentation: https://jena.apache.org/documentation/shacl/
- Apache Jena 6.3.0 change notes: https://apache.googlesource.com/jena/+/refs/heads/main/CHANGES.txt
- ARQ SERVICE feature and configuration: https://jena.apache.org/documentation/query/service.html
- Apache Software Foundation CVE-2026-86155 advisory: https://www.openwall.com/lists/oss-security/2026/11/23/32
Top comments (0)