LiteLLM AI Gateway — Unauthenticated Remote Code Execution
Executive Summary
LiteLLM is a widely deployed open-source AI gateway / proxy that exposes many LLM providers behind one OpenAI-compatible API. Two of its Model Context Protocol (MCP) preview endpoints — POST /mcp-rest/test/connection and POST /mcp-rest/test/tools/list — accept a full stdio server config (command, args, env) and, when invoked, spawn the supplied command as a subprocess under the proxy process user. In vulnerable builds these endpoints have no admin-role gate, so any holder of a proxy API key can run arbitrary commands (CVE-2026-42271, CVSS 8.7).
Horizon3.ai demonstrated that the command injection chains with CVE-2026-48710 — a Host-header validation bypass ("BadHost") in the Starlette web framework (CVSS 6.5) — to reach the admin-scoped endpoints without authentication from any network-reachable host. The combined chain is CVSS 10.0. CISA added CVE-2026-42271 to the KEV catalog on 2026-06-08 citing active in-the-wild exploitation, and public PoCs exist.
Attacker objective: code execution on the gateway host to harvest the crown jewels an AI gateway holds — provider API keys injected as environment variables (OpenAI, Anthropic, Azure, AWS Bedrock), mounted secret files, and the LiteLLM config/database — then pivot outward with a reverse shell or dropped tooling.
Highest-value defensive angle: the gateway is a Python service. A LiteLLM parent (python/uvicorn/gunicorn) spawning a shell, network client, or interpreter is never normal and is the cleanest, lowest-FP detection in this pack (Q1–Q3). Because atomic network IOCs are not published, hunt on this process-lineage behavior rather than IPs/hashes.
Defender priority: Patch LiteLLM to 1.83.7+ and Starlette to 1.0.1+, block the two /mcp-rest/test/* endpoints at the ingress today, then hunt Q1–Q3 for any python/uvicorn process that has already spawned a shell — and rotate every provider key the proxy could read.
Source Review & Web Hunter Notes
| Tier | Source | Key finding | Carry fwd |
|---|---|---|---|
| 1 | NVD — CVE-2026-42271 | Command injection via MCP stdio test endpoints; affected 1.74.2–1.83.6; CVSS 8.7 | Yes |
| 1 | GitHub Advisory GHSA-v4p8-mg3p-g94g | Authenticated command execution via MCP stdio test endpoints; fixed 1.83.7 (endpoints now require PROXY_ADMIN) | Yes |
| 1 | CISA KEV (added 2026-06-08) | Confirmed active exploitation of CVE-2026-42271 | Yes |
| 1 | Horizon3.ai attack research | Chains CVE-2026-42271 with Starlette CVE-2026-48710 host-header bypass → unauthenticated RCE (combined CVSS 10.0); PoC published | Yes |
| 2 | The Hacker News (2026-06-09) | Endpoints accept command/args/env for stdio transport; subprocess spawned under proxy user; env holds provider keys | Yes |
| 2 | Cloud Security Alliance / Rescana | Impact: read env keys, mounted credential files, config & DB; mitigation = block test endpoints at reverse proxy if unable to patch | Partial |
Intel gap: No public campaign has released atomic network IOCs (C2 IPs, payload hashes). This pack therefore leads with behavioral/process-lineage detection and configuration indicators, and uses REPLACE_WITH_… placeholders in the IOC CSV rather than fabricated values.
Hunt Brief & Attack Chain
Hunt hypotheses (fidelity-ordered)
| # | Hypothesis | MITRE | Telemetry | Conf |
|---|---|---|---|---|
| H1 | A LiteLLM parent (python/uvicorn/gunicorn) spawned a shell or network client — the direct RCE signal | T1190, T1059.004 | ProcessRollup2 | High |
| H2 | A gateway subprocess ran discovery / secret-access commands (id, env, /proc/self/environ, read secrets) | T1552.001, T1082 | ProcessRollup2 | High |
| H3 | Reverse-shell / interactive-shell patterns launched from the gateway host | T1059.004, T1071 | ProcessRollup2 | High |
| H4 | Egress from the proxy or its child shell to unexpected infrastructure (C2 / exfil) | T1041, T1071.001 | NetworkConnectIP4 | Med |
| H5 | A gateway subprocess wrote a script / executable to disk (staged tool, webshell, dropper) | T1105, T1505.003 | PeFileWritten / FileCreateInfo | Med |
| H6 | HTTP requests to /mcp-rest/test/* and anomalous Host headers at the ingress (bypass + injection) | T1190 | Proxy / WAF / ingress logs | Med |
Attack chain
| Step | Action | Telemetry / hunt angle |
|---|---|---|
| 1 · Recon | Locate an internet-exposed LiteLLM proxy (commonly TCP 4000) | External scan logs; ingress access logs |
| 2 · Auth bypass | CVE-2026-48710 — crafted Host header defeats Starlette host validation, reaching admin-only MCP test endpoints unauthenticated | Ingress HTTP logs: Host header not matching expected FQDN; requests to /mcp-rest/test/* |
| 3 · Injection | CVE-2026-42271 — POST stdio config {command,args,env}; LiteLLM spawns it as a subprocess under the proxy user | ProcessRollup2: python/uvicorn parent → sh/bash/curl child (Q1) |
| 4 · Discovery | Child runs id/whoami/uname/env, reads /proc/self/environ | ProcessRollup2 CommandLine (Q2) |
| 5 · Cred access | Read provider API keys from env; read mounted secret files, LiteLLM config & DB | CommandLine referencing environ/secrets/.env (Q2) |
| 6 · C2 / exfil | Reverse shell or curl/wget to attacker infra; stage tooling | Reverse-shell CommandLine (Q3); egress (Q4); file write (Q5) |
Consolidated IOC Table
No atomic network IOCs (C2 IPs, payload hashes) have been published for this activity. The indicators below are exploit-path, configuration, and behavioral signals — use them as hunts, not blocklist entries, until campaign-specific atomics are sourced.
| Type | Value | Conf | Action | Context |
|---|---|---|---|---|
| URI path | /mcp-rest/test/connection | high | hunt | CVE-2026-42271 injection endpoint (POST) |
| URI path | /mcp-rest/test/tools/list | high | hunt | CVE-2026-42271 injection endpoint (POST) |
| HTTP header | Host header not matching served FQDN | medium | hunt | CVE-2026-48710 "BadHost" bypass attempt |
| Behavior | python/uvicorn/gunicorn → sh/bash/curl child | high | detect | Command injection execution (Q1) |
| Behavior | Gateway child reads /proc/self/environ or mounted secrets | high | hunt | Provider-key theft (Q2) |
| Config | LiteLLM 1.74.2 – 1.83.6 | high | enrich | Vulnerable version range (fixed 1.83.7) |
| Config | Starlette 1.0.0 or earlier | high | enrich | Host-header bypass dependency (fixed 1.0.1) |
| Config | LiteLLM admin/proxy exposed to the internet | medium | enrich | Reachability precondition for the chain |
Affected Surface & Telemetry Matrix
| Surface | Required telemetry | Priority | Gap risk |
|---|---|---|---|
| Linux container/host running LiteLLM (typical) | Falcon Linux sensor — ProcessRollup2, NetworkConnectIP4, file-write events | Critical | Sensor often absent inside minimal/distroless AI containers |
| Windows host running LiteLLM | ProcessRollup2 (python.exe → cmd/powershell) | High | Less common deployment |
| Reverse proxy / API gateway / K8s ingress | HTTP access logs (URI path + Host header) in NGSIEM | High | Ingress logs frequently not onboarded to Falcon |
| Provider secrets (env / mounted files) | N/A — preventive (secrets manager, key rotation) | Critical | Env-var keys invisible to EDR once read |
Telemetry note: the strongest detections here need the Falcon Linux sensor running inside the LiteLLM container (or on the host with container visibility). Confirm sensor coverage on AI/ML infrastructure before trusting Q1–Q5.
ATT&CK Mapping
| Tactic | Technique | Observed behavior | Query / Control |
|---|---|---|---|
| Initial Access | T1190 Exploit Public-Facing Application | MCP test endpoints reached via Starlette host-header bypass | Q6 (native) · patch/ingress block |
| Execution | T1059.004 Unix Shell | Proxy spawns sh/bash from injected stdio command | Q1, Q3 |
| Execution | T1059.006 Python / T1059.001 PowerShell | python -c / cmd / powershell child on Windows hosts | Q6 |
| Discovery | T1082 System Information · T1033 Owner/User | id, whoami, uname, hostname under gateway parent | Q2 |
| Credential Access | T1552.001 Credentials In Files / Env | Read /proc/self/environ, .env, mounted secrets, provider keys | Q2 · secrets-manager control |
| Command & Control | T1071.001 Web Protocols · T1105 Ingress Tool Transfer | Reverse shell / curl-wget egress; staged tooling | Q3, Q4, Q5 |
| Persistence | T1505.003 Web Shell | Script/webshell written by a gateway subprocess | Q5 |
| Exfiltration | T1041 Exfil Over C2 Channel | Stolen keys/config sent to attacker infra | Q4 |
Native Audit-Log Hunts (non-CQL)
Where the Falcon sensor is not inside the container, the exploit still leaves a trail at the ingress / reverse proxy and in LiteLLM's own logs. Run these against whatever platform holds those logs (NGSIEM, ELK, cloud LB logs, WAF).
Reverse-proxy / ingress access log — exploit endpoints & host-header bypass
// Any HTTP method to the MCP test endpoints is suspicious in production:
request.path in ("/mcp-rest/test/connection", "/mcp-rest/test/tools/list")
// Host-header bypass (CVE-2026-48710): Host value not matching your served FQDN(s)
http.host NOT IN ("gateway.example-allowed-fqdn") AND status_code < 500
// Triage: source IP, count, first/last seen, request body size (large body = stdio config payload)
LiteLLM application log
// Look for MCP "test connection" / "tools list" invocations and any subprocess-spawn log lines. // Correlate their timestamps against the ProcessRollup2 hits from Q1-Q3 on the same host.
Kubernetes / container runtime
// If runtime audit is enabled, alert on 'exec into' or process creation inside the // litellm pod where the exec'd binary is a shell (sh, bash) - the pod should never run one.
These native hunts are the primary coverage for Step 2 (host-header bypass), which produces no endpoint process telemetry. Treat any hit here as a trigger to pull Q1–Q3 for the same host/timeframe.
CrowdStrike LogScale CQL Hunt Queries
Looks for: a LiteLLM/Python gateway process directly spawning a shell, interpreter, or network client — the exact signature of CVE-2026-42271 command injection. An AI gateway has no legitimate reason to fork sh/curl.
// HUNT: LiteLLM proxy process spawning a shell / net client (CVE-2026-42271) // CONF: high FP: low COST: low | REQUIRES: Linux/Windows process telemetry (ProcessRollup2) #event_simpleName=/ProcessRollup2|SyntheticProcessRollup2/ | ParentBaseFileName=/^(python[0-9.]*|uvicorn|gunicorn|litellm|hypercorn)$/i | FileName=/^(sh|bash|dash|zsh|curl|wget|nc|ncat|socat|perl|ruby)$/i | table([ComputerName, UserName, ParentBaseFileName, FileName, CommandLine, aid, ProcessStartTime], limit=200)
Looks for: post-exploit discovery and provider-key theft — reads of /proc/self/environ, id/whoami/env, or cat of .env/secrets/config under a gateway parent.
// HUNT: Post-exploit discovery / secret access under a LiteLLM subprocess // CONF: high FP: low COST: low | REQUIRES: process telemetry with CommandLine #event_simpleName=/ProcessRollup2|SyntheticProcessRollup2/ | ParentBaseFileName=/^(python[0-9.]*|uvicorn|gunicorn|litellm|sh|bash|dash)$/i | CommandLine=/(proc\/self\/environ|proc\/1\/environ|run\/secrets|(^|\s)(id|whoami|uname|hostname|env|printenv)(\s|$)|cat\s+.*(\.env|environ|secrets|config\.yaml))/i | table([ComputerName, UserName, ParentBaseFileName, FileName, CommandLine, aid], limit=200)
Looks for: classic reverse-shell one-liners (bash -i, /dev/tcp, nc -e, python socket, perl/ruby socket) launched from the gateway host after injection.
// HUNT: Reverse-shell / interactive-shell one-liners from a LiteLLM host // CONF: high FP: low COST: low | REQUIRES: process telemetry with CommandLine #event_simpleName=/ProcessRollup2|SyntheticProcessRollup2/ | ParentBaseFileName=/^(python[0-9.]*|uvicorn|gunicorn|litellm|sh|bash|dash)$/i | CommandLine=/(bash\s+-i|sh\s+-i|dev\/tcp\/|(nc|ncat|socat)\s+.*(-e|exec|EXEC:)|python[0-9.]*\s+-c\s+.*(socket|pty\.spawn|subprocess)|(perl|ruby)\s+-e\s+.*socket)/i | table([ComputerName, UserName, ParentBaseFileName, FileName, CommandLine, aid], limit=200)
Looks for: network connections initiated by the proxy or a child shell to common C2/exfil ports. FP: the proxy legitimately dials LLM providers on 443/80 — allow-list known provider CIDRs and focus first on 4444/1337/9001 and any 443 egress made by sh/curl children (not the python parent).
// HUNT: Egress from a LiteLLM proxy / child shell to unexpected infra (C2 / exfil) // CONF: medium FP: medium COST: medium | REQUIRES: NetworkConnectIP4 with process context // TUNING: allowlist known LLM-provider CIDRs and exclude the python parent's own 443 egress; focus first on 4444/1337/9001 #event_simpleName=NetworkConnectIP4 | ContextBaseFileName=/^(python[0-9.]*|uvicorn|gunicorn|litellm|sh|bash|dash|curl|wget|nc|ncat|socat)$/i | RemotePort=/^(4444|1337|9001|8080|8443|53)$/ | table([ComputerName, ContextBaseFileName, RemoteAddressIP4, RemotePort, aid], limit=200)
Looks for: a staged tool, webshell, or dropper written to disk by a gateway subprocess. FP: build/CI containers legitimately write .py/.sh — scope to production gateway hosts and exclude known package-install paths (site-packages, pip cache).
// HUNT: File written to disk by a LiteLLM subprocess (staged tool / webshell / dropper) // CONF: medium FP: medium COST: low | REQUIRES: file-write telemetry with process context // TUNING: exclude package-install paths (site-packages, pip cache) and CI/build hosts that legitimately write scripts #event_simpleName=/PeFileWritten|NewExecutableWritten|FileCreateInfo/ | ContextBaseFileName=/^(python[0-9.]*|uvicorn|gunicorn|litellm|sh|bash|dash|curl|wget)$/i | TargetFileName=/\.(sh|py|elf|bin|out|so|php|jsp)$/i | table([ComputerName, UserName, ContextBaseFileName, TargetFileName, aid], limit=200)
Looks for: the Windows equivalent of Q1 — a Python/uvicorn gateway parent spawning cmd, PowerShell, or a LOLBin download client. Rare deployment but a very high-fidelity signal where it applies.
// HUNT: Windows LiteLLM host - python/uvicorn spawning cmd or PowerShell (CVE-2026-42271) // CONF: high FP: low COST: low | REQUIRES: Windows process telemetry #event_simpleName=/ProcessRollup2|SyntheticProcessRollup2/ | ParentBaseFileName=/^(python[0-9.]*\.exe|uvicorn\.exe|gunicorn\.exe|litellm\.exe|py\.exe)$/i | FileName=/^(cmd\.exe|powershell\.exe|pwsh\.exe|curl\.exe|certutil\.exe|bitsadmin\.exe)$/i | table([ComputerName, UserName, ParentBaseFileName, FileName, CommandLine, aid], limit=200)
CrowdStrike Custom IOA Recommendations
| IOA name | Pattern | Exclusions | Action |
|---|---|---|---|
| AI Gateway Shell Spawn | Parent image = python/uvicorn/gunicorn/litellm; Child image = sh/bash/dash/zsh | Sanctioned entrypoint wrappers that legitimately exec a shell (allowlist by full path) | Detect → Block on prod gateway host groups |
| AI Gateway Net Client | Parent = python/uvicorn/gunicorn; Child = curl/wget/nc/ncat/socat | Health-check sidecars using curl (allowlist container) | Detect (high severity) |
| Gateway Reverse Shell | CommandLine contains /dev/tcp, bash -i, nc -e, python -c socket on a gateway host group | None expected | Block |
Deployment path: promote Q1/Q3 first — they are low-FP and map cleanly to a parent/child image-name IOA. Scope IOAs to a host group tagged for AI/ML infrastructure so the (rare) legitimate shell-spawning services elsewhere aren't affected.
Machine-Readable IOC Appendix
No campaign atomics are published. The CSV uses REPLACE_WITH_… placeholders — populate only from IOCs you source and cite. Ship the behavioral and audit blocks now; they need no atomics.
type,value,action,severity,expiration,description,tags sha256,REPLACE_WITH_SHA256,prevent,critical,2027-01-14,LiteLLM RCE payload,campaign:LiteLLM-RCE ipv4,REPLACE_WITH_C2_IP,detect,high,2026-10-14,LiteLLM RCE C2,campaign:LiteLLM-RCE domain,REPLACE_WITH_C2_DOMAIN,detect,high,2026-10-14,LiteLLM RCE C2,campaign:LiteLLM-RCE
# Parent -> Child image (all high fidelity on a gateway host): python|uvicorn|gunicorn|litellm -> sh|bash|dash|zsh python|uvicorn|gunicorn|litellm -> curl|wget|nc|ncat|socat # CommandLine markers: /dev/tcp/ bash -i nc -e python -c ...socket /proc/self/environ printenv cat *.env /run/secrets
# Flag any host where: LiteLLM version in [1.74.2 .. 1.83.6] # fixed in 1.83.7 Starlette version 1.0.0 or earlier # fixed in 1.0.1 AND /mcp-rest/test/connection reachable pre-auth # Confirm patched: pip show litellm | grep -i version python -c "import starlette,sys; sys.stdout.write(starlette.__version__)"
# nginx / reverse-proxy stop-gap if you cannot patch immediately:
location = /mcp-rest/test/connection { return 403; }
location = /mcp-rest/test/tools/list { return 403; }
# Enforce a Host allow-list to blunt CVE-2026-48710:
if ($host != "gateway.your-fqdn.example") { return 421; }
Detection Validation Gates
| Gate | Check | Pass criteria |
|---|---|---|
| Telemetry ready | Falcon Linux sensor reporting ProcessRollup2 from inside the LiteLLM container/host | Sample process events visible for the gateway host in the last 24h |
| Benign baseline | Run Q1 over 7 days pre-incident | Understand/allowlist any legitimate shell-spawning entrypoint before alerting |
| Positive test | In a lab, POST a benign stdio config (command=id) to the test endpoint on a vulnerable build | Q1 & Q2 fire on the resulting python→id lineage |
| Bypass test | Send the same request with a spoofed Host header on an unpatched Starlette | Native ingress hunt (s7) flags the Host anomaly + endpoint path |
| Promotion | Q1/Q3 clean over baseline window | Promote to Custom IOA (Block) on the AI-infra host group |
Hardening — Tiered
- Patch LiteLLM to 1.83.7 or later — the fix restricts both MCP test endpoints to the
PROXY_ADMINrole. (MITRE M1051 Update Software) - Upgrade Starlette to 1.0.1 or later — closes the CVE-2026-48710 host-header bypass that makes the chain unauthenticated. (M1051)
- Block
/mcp-rest/test/connectionand/mcp-rest/test/tools/listat the reverse proxy / ingress if you cannot patch instantly. (M1037 Filter Network Traffic) - Remove the gateway admin/proxy from direct internet exposure — front it with an authenticated gateway or VPN. (M1030 Network Segmentation)
- Rotate every provider API key reachable from the proxy environment (assume exposure if you were unpatched and internet-facing). (M1027 Password Policies / key hygiene)
- Run the proxy as a non-root, least-privilege user in a read-only container with no shell in the image; drop unnecessary Linux capabilities. (M1026 Priv Account Mgmt · M1038 Execution Prevention)
- Move provider keys out of process env into a secrets manager issuing short-lived tokens; stop baking long-lived keys into env/config. (M1041 Encrypt Sensitive Information)
- Enforce a Host allow-list at the ingress (only the served FQDN) to defeat host-header spoofing defensively. (M1037)
- Egress-filter the gateway to only the known LLM provider endpoints, so a reverse shell or exfil attempt has nowhere to go. (M1030 / M1037)
- Network-segment AI gateways and broker all provider calls through an allow-listed egress proxy. (M1030)
- Apply pod policy — seccomp
RuntimeDefault, AppArmor, and admission control that forbids shell exec in gateway pods. (M1038) best-practice - Gate AI-infra dependencies in CI with SBOM + automated CVE checks so a vulnerable LiteLLM/Starlette can't reach production unnoticed. (M1051)
Deployable Playbooks
1 · Patch & verify (Python / container)
# Pin the fixed versions and rebuild the image:
pip install "litellm==1.83.7" "starlette>=1.0.1" # or a later release
# Verify at runtime:
pip show litellm | grep -i version # expect 1.83.7 or later
python -c "import starlette,sys; sys.stdout.write(starlette.__version__)"
# Confirm the test endpoints now require admin (expect 401/403 unauth):
curl -s -o /dev/null -w "%{http_code}\n" -X POST http://127.0.0.1:4000/mcp-rest/test/connection
2 · Reverse-proxy stop-gap (nginx) — until patched
location = /mcp-rest/test/connection { return 403; }
location = /mcp-rest/test/tools/list { return 403; }
# Host allow-list to blunt CVE-2026-48710:
map $host $bad_host { default 1; "gateway.your-fqdn.example" 0; }
if ($bad_host) { return 421; }
3 · Kubernetes hardening (gateway Deployment)
securityContext:
runAsNonRoot: true
runAsUser: 10001
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
capabilities: { drop: ["ALL"] }
seccompProfile: { type: RuntimeDefault }
---
# NetworkPolicy: egress only to known provider endpoints (example — tune to your providers)
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata: { name: litellm-egress-allowlist }
spec:
podSelector: { matchLabels: { app: litellm } }
policyTypes: ["Egress"]
egress:
- to: [{ ipBlock: { cidr: 0.0.0.0/0 } }] # REPLACE with provider CIDRs
ports: [{ protocol: TCP, port: 443 }]
4 · Provider key rotation checklist
# For each provider whose key was in the gateway env/config: # 1. Issue a new key in the provider console. # 2. Update the secrets manager entry (NOT the container env). # 3. Revoke the old key. # 4. Review provider usage/billing logs for anomalous calls since the exposure window.
Containment Runbook
| Phase | Actions | Owner | Evidence |
|---|---|---|---|
| Isolate | Network-contain the gateway host via Falcon; block the two test endpoints at ingress; pull the host from the LB pool | SOC / Platform | Containment ticket; ingress rule change |
| Scope | Run Q1–Q6 + native ingress hunt across all LiteLLM hosts for the exposure window; identify which keys/files were reachable | Threat Hunt | Query exports; process trees |
| Eradicate | Patch LiteLLM 1.83.7+ / Starlette 1.0.1+; rebuild the container from a clean image; remove any dropped tooling/webshell found by Q5 | Platform | Image digest; file-removal log |
| Rotate | Rotate ALL provider API keys and any secret reachable from the proxy; invalidate LiteLLM proxy keys/DB creds | IAM / Platform | Key-rotation record; provider billing review |
| Recover | Redeploy hardened (non-root, read-only, egress-limited); re-expose only behind auth; monitor Q1/Q3 as IOAs | Platform / SOC | Deployment manifest; IOA status |
| Report | Document exposure window, keys rotated, provider-side abuse (if any), lessons learned | IR Lead | Incident report |
Detection Coverage Map
| Technique | Behavior | CQL | IOA | Coverage |
|---|---|---|---|---|
| T1190 | Exploit MCP endpoints via host-header bypass | native (s7) | — | Partial (ingress logs needed) |
| T1059.004 | Gateway spawns shell | Q1, Q3 | Yes | Good |
| T1059.001/.006 | Windows cmd/powershell/python child | Q6 | Yes | Good |
| T1552.001 | Env / secret / key theft | Q2 | Partial | Good |
| T1082 / T1033 | Discovery commands | Q2 | — | Good |
| T1071 / T1041 | C2 / exfil egress | Q4 | — | Partial (provider-egress FP) |
| T1105 / T1505.003 | Dropped tool / webshell | Q5 | — | Partial |
Known gaps: (1) Step 2 (host-header bypass) has no endpoint process telemetry — coverage depends on ingress/WAF logs being onboarded (s7). (2) Minimal/distroless AI containers frequently lack the Falcon sensor, blinding Q1–Q5 — confirm sensor coverage first (see Validation Gates). (3) Egress detection (Q4) is FP-prone because the proxy legitimately calls providers on 443; allow-list provider CIDRs to sharpen it.
Hunt Summary Ticket
TITLE: LiteLLM AI Gateway Unauthenticated RCE — CVE-2026-42271 + CVE-2026-48710
SEVERITY: Critical (combined CVSS 10.0 · CISA KEV 2026-06-08 · exploited ITW)
SCOPE: All hosts/containers running LiteLLM 1.74.2–1.83.6 (esp. internet-facing)
HYPOTHESIS: A LiteLLM parent (python/uvicorn/gunicorn) spawned a shell/net client
or read env secrets after MCP stdio test-endpoint command injection.
QUERIES: Q1 shell-spawn · Q2 secret access · Q3 reverse shell · Q4 egress
Q5 file-write · Q6 Windows · native ingress hunt (s7)
DO FIRST: 1) Inventory LiteLLM + Starlette versions and internet exposure
2) Run Q1 & Q3 over 14 days across AI-infra hosts
3) Block /mcp-rest/test/* at ingress; patch 1.83.7+ / 1.0.1+
FINDINGS: ____________________________________________________________
GAPS: Ingress logs not onboarded? Sensor inside container? Provider-egress FP
ACTIONS: Patch · block endpoints · rotate provider keys · promote Q1/Q3 to IOA
OWNER: ____________________ VERSION: v0.2 (2026-07-14)
Changelog
table() calls now carry an explicit row limit: the default is 200 and truncation is silent, so a capped result was indistinguishable from a complete one. Atomic-IOC sweeps (filters over 5+ hashes or C2 IPs) use limit=max so a wide infection is never silently under-scoped; behavioural hunts use limit=200, where exceeding the cap indicates the query needs tuning. Where present, event names that do not exist in the Falcon data model were corrected (e.g. ServiceInstalled is a Sysmon concept, not a Falcon event; ElfFileWritten is ELFFileWritten) — such queries could never return a row. No detection logic, fields, or IOCs changed.References
| Tier | Source | Used for | Accessed |
|---|---|---|---|
| 1 | NVD — CVE-2026-42271 | Affected versions, CVSS, mechanism | 2026-07-14 |
| 1 | GitHub Advisory GHSA-v4p8-mg3p-g94g | Endpoint detail, fix (PROXY_ADMIN in 1.83.7) | 2026-07-14 |
| 1 | CISA KEV Catalog | Active-exploitation confirmation (added 2026-06-08) | 2026-07-14 |
| 1 | Horizon3.ai — CVE-2026-42271 chained with CVE-2026-48710 | Unauth-RCE chain, PoC, detection indicators | 2026-07-14 |
| 2 | The Hacker News — LiteLLM flaw exploited in the wild | Subprocess-spawn detail, impact summary | 2026-07-14 |
| 2 | Rescana — Active exploitation alert | Starlette bypass context, mitigation | 2026-07-14 |
Generated 2026-07-14 · HuntPack · Defensive detection & hardening content only.