☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2026-21729

CVE-2026-21729 Supply Chain Attack in Loki
📅 PUBLISHED: 2026-07-16 03:12 UTC 🔄 UPDATED: 2026-09-23 20:20 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.46%
👁️
0.46% probability
11.5× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Country: Sweden License: Freemium
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
7.5
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2026-21729 is a denial-of-service (DoS) vulnerability in Grafana Loki, a log aggregation system. The flaw allows an unauthenticated attacker to craft queries with excessively large limit parameters, causing the service to allocate massive amounts of memory. This can lead to resource exhaustion and service unavailability, particularly in deployments without resource quotas or rate limiting. The vulnerability has a CVSS score of 7.5 (High) and currently has no official patch. Mitigation requires strict configuration controls, such as limiting query limits, enabling rate limiting, and using resource quotas.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

Loki is distributed as a Go binary and via Docker images. While no direct supply chain compromise is reported, the vulnerability highlights the risk of default configurations that allow unbounded resource consumption. Organizations using Loki should verify their deployment’s configuration and apply security controls to prevent abuse.

CVSS Breakdown & Threat Level

  • CVSS Score: 7.5 (High)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
  • Attack Vector: Network
  • Attack Complexity: Low
  • Privileges Required: None
  • User Interaction: None
  • Scope: Unchanged
  • Confidentiality Impact: None
  • Integrity Impact: None
  • Availability Impact: High

The vulnerability is easily exploitable remotely without authentication, making it a significant threat to Loki service availability.

Deep Dive & Mechanics

Loki’s query API accepts a limit parameter to control the number of log lines returned. When a query with an extremely large limit (e.g., 10^9) is submitted, the system attempts to allocate memory proportional to that limit. Without proper bounds checking or resource throttling, this can exhaust available memory, causing the Loki process to crash or become unresponsive.

The issue is rooted in the query execution path, where the limit is used to size internal buffers and result sets. In distributed deployments, the impact can cascade across queriers and ingesters, amplifying the denial-of-service effect.

Vulnerable vs. Patched Code

Vulnerable Code (Conceptual):

func (q *Querier) Query(ctx context.Context, params QueryParams) (Result, error) {
    limit := params.Limit
    // No validation on limit size
    results := make([]LogEntry, 0, limit)
    // ... fetch and append logs
    return results, nil
}

Patched Code (Conceptual):

func (q *Querier) Query(ctx context.Context, params QueryParams) (Result, error) {
    limit := params.Limit
    if limit > maxQueryLimit {
        limit = maxQueryLimit
    }
    results := make([]LogEntry, 0, limit)
    // ... fetch and append logs
    return results, nil
}

The fix involves adding a configuration option max_query_limit and enforcing it server-side. Without an official patch, administrators must implement this via configuration or a reverse proxy.

Exploitation & Lab Setup

Red Team

  1. Identify Target: Scan for Loki HTTP endpoints (default port 3100).
  2. Craft Malicious Query: Send a GET request with an excessively large limit parameter.
    curl "http://target:3100/loki/api/v1/query_range?query={job=\"varlogs\"}&limit=999999999999&start=0&end=9999999999"
    
  3. Observe Impact: Monitor target memory usage; the service may become unresponsive or crash.

Blue Team

  1. Detection: Monitor for queries with abnormally high limit values in Loki logs or network traffic.
  2. Mitigation: Configure Loki with query_timeout and max_query_limit in the configuration file:
    querier:
      query_timeout: 30s
      max_query_limit: 5000
    
  3. Rate Limiting: Use a reverse proxy (e.g., Nginx) to limit request rates and block large limit values.
    location /loki/api/v1/query_range {
        if ($arg_limit ~ "^[0-9]{7,}$") {
            return 403;
        }
        proxy_pass http://loki_backend;
    }
    

Indicators of Compromise (IOCs)

  • Network: HTTP GET requests to /loki/api/v1/query_range with limit parameter exceeding 10,000.
  • Logs: Loki logs showing out of memory errors or query timeout for queries with large limits.
  • System: High memory usage on Loki nodes, potential OOM killer events.

Detection Engineering

YARA Rule

rule Loki_Large_Limit_DoS {
    meta:
        description = "Detects Loki queries with excessively large limit parameter"
        author = "Valters IT"
        date = "2026-01-01"
        reference = "CVE-2026-21729"
    strings:
        $limit_param = /limit=[0-9]{7,}/ nocase
    condition:
        $limit_param
}

Sigma Rule

title: Loki Large Query Limit DoS Attempt
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects HTTP requests to Loki with abnormally large limit parameter
author: Valters IT
logsource:
    category: webserver
    product: nginx
detection:
    selection:
        cs-method: 'GET'
        cs-uri-query|contains: 'limit='
        cs-uri-query|re: 'limit=[0-9]{7,}'
    condition: selection
falsepositives:
    - Legitimate queries with large limits (rare)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2026-21729 Loki Large Limit DoS Attempt"; flow:to_server; http.uri; content:"/loki/api/v1/query_range"; http.uri; content:"limit="; pcre:"/limit=[0-9]{7,}/"; classtype:attempted-dos; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Configuration Hardening: Set max_query_limit in Loki configuration to a reasonable value (e.g., 5000).
  2. Rate Limiting: Implement rate limiting at the reverse proxy or load balancer.
  3. Resource Quotas: Use container orchestration (e.g., Kubernetes) to limit memory and CPU for Loki pods.
  4. Monitoring: Alert on high memory usage and query timeouts.
  5. Update: Monitor for official patches from Grafana Labs and apply promptly.

Valters IT
Securing Digital Frontiers

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2026-21729/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.