CVE Professor
/
All CVEs
CVE-2026-144679

CVE-2026-144679 — Thanos-io Thanos (0.42.5) — CWE-22

HIGH CVSS 8.3 NVD

Thanos through 0.42.5 contains a path traversal vulnerability in Receive that allows unauthenticated remote-write clients to target the data directory by supplying '.' or '..' as the tenant ID. Attackers can send one write with such a THANOS-TENANT header and stop writing, causing tenant pruning to call os.RemoveAll and delete all local TSDB data.

Thanos through 0.42.5 contains a path traversal vulnerability in Receive that allows unauthenticated remote-write clients to target the data directory by supplying '.' or '..' as the tenant ID. Attackers can send one write with such a THANOS-TENANT header and stop writing, causing tenant pruning to call os.RemoveAll and delete all local TSDB data.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H
Attack Vector Network AV:N
Attack Complexity High AC:H
Privileges Req. None PR:N
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality None C:N
Integrity High I:H
Availability High A:H
AI Security Analysis & Remediation

🎯 What is this vulnerability?

CVE-2026-144679 is a Path Traversal (CWE-22) vulnerability in Thanos (a scalable, highly available Prometheus-compatible long-term storage solution) up to version 0.42.5.

The flaw resides in the Receive component, which handles data ingestion via the Prometheus Remote Write protocol. The vulnerability stems from a lack of proper input validation and sanitization on the THANOS-TENANT header.

1. Missing Validation: The Receive service accepts a tenant ID from the THANOS-TENANT HTTP header. It fails to validate that this ID is a safe filesystem path component.
2. Path Traversal: An attacker can supply . (current directory) or .. (parent directory) as the tenant ID.
3. Logic Flaw in Pruning: Thanos has a background process that prunes (deletes) tenants that have not received data for a certain period. When a tenant ID is . or .., the pruning logic incorrectly resolves the path to the root data directory of the Thanos instance.
4. Destructive Action: The pruning process calls os.RemoveAll on the resolved path. Since the path resolves to the root data directory, all local TSDB (Time Series Database) data is deleted.

CVSS Vector Analysis:

  • AV:N / PR:N / UI:N: Exploitable remotely without authentication or user interaction.

  • AC:H (High Complexity): The attacker must time the request correctly to trigger the pruning logic, or the pruning interval must be short enough to be triggered shortly after the malicious write. It is not a simple "send request and get RCE" but requires understanding the internal pruning lifecycle.

  • I:H / A:H: High impact on Integrity (data deletion) and Availability (service disruption due to data loss).

  • C:N: No direct confidentiality impact (data is deleted, not exfiltrated).
  • ⚡ Attack Chain

    1. Discovery & Reconnaissance

  • Target Identification: Identify Thanos receive endpoints. These are typically exposed on port 10902 (default for thanos receive) or behind a reverse proxy.
  • Version Check: Check the User-Agent or response headers for Thanos version. Versions ≤ 0.42.5 are vulnerable.
  • Service Verification: Confirm the endpoint accepts Prometheus Remote Write requests. A simple curl with a valid remote write payload (even empty) should return a 200 OK or 202 Accepted.
  • 2. Exploitation

    The attacker sends a single Remote Write request with a malicious THANOS-TENANT header. The goal is to create a "tenant" that resolves to the root data directory.

    Illustrative PoC (curl):

    Note: The exact URI path for the remote write endpoint in Thanos Receive is typically /api/v1/receive or similar, depending on configuration. The THANOS-TENANT header is the critical vector. The payload body must be a valid Prometheus Remote Write protobuf message (even if empty or minimal) to be accepted by the ingestion pipeline.

    # Generate a minimal valid Prometheus Remote Write protobuf payload
    # This is a base64-encoded empty or minimal timeseries message
    PAYLOAD=$(echo -n "" | base64)
    
    # Send the malicious request
    # The key is the THANOS-TENANT header set to '.' or '..'
    curl -X POST "http://<THANOS_RECEIVE_HOST>:10902/api/v1/receive" \
      -H "Content-Type: application/x-protobuf" \
      -H "THANOS-TENANT: ." \
      --data-binary "$PAYLOAD"

    Mechanism:
    1. The request is accepted by the Receive service.
    2. The tenant ID . is stored in the internal tenant registry.
    3. The background pruning process runs (interval depends on configuration, e.g., every 5 minutes).
    4. The pruner identifies tenant . as inactive (if no further writes are sent).
    5. The pruner constructs the path: <DATA_DIR>/. which resolves to <DATA_DIR>.
    6. os.RemoveAll(<DATA_DIR>) is executed.
    7. All TSDB data is deleted.

    3. Post-Exploitation

  • Data Destruction: The primary impact is the complete loss of local TSDB data. This is not recoverable without backups.
  • Service Disruption: Thanos Receive will continue to run, but it will have no historical data. Queries against the local store will return empty results.
  • No RCE: This vulnerability does not provide Remote Code Execution. It is a data destruction vulnerability.
  • Persistence: The attacker does not need to maintain access. A single request is sufficient to trigger the deletion.
  • 🌍 Real World Impact

  • Confidentiality (None): No data is exfiltrated. The data is destroyed.
  • Integrity (High): The integrity of the data store is completely compromised. All historical metrics are lost.
  • Availability (High): The monitoring and alerting capabilities of the environment are severely degraded. Dashboards will show gaps or no data. Alerting rules that depend on historical data will fail.
  • Practical Consequences:

  • Loss of Historical Metrics: All time-series data stored in the local TSDB is deleted. This includes metrics from the last retention period.

  • Alerting Blindness: If Thanos is used for long-term storage, the loss of data means that alerts based on historical trends or long-term averages will stop working.

  • Compliance Violations: In regulated environments, the loss of monitoring data can be a compliance issue.

  • Recovery Time: Recovery depends on the availability of backups. If no backups exist, the data is permanently lost.
  • 🛡️ Remediation & Mitigation

    1. Upgrade

  • Affected Versions: Thanos through 0.42.5.
  • Fix: Upgrade to Thanos 0.42.6 or later, where the tenant ID validation has been fixed to reject . and .. and other unsafe path components.
  • 2. Workarounds (If Immediate Upgrade is Not Possible)

  • Network Segmentation: Restrict access to the Thanos Receive endpoint (10902) to only trusted Prometheus instances. Use firewall rules to block external access.
  • Reverse Proxy Filtering: If a reverse proxy (e.g., Nginx, Envoy) is in front of Thanos, configure it to reject requests with THANOS-TENANT headers containing . or ...
  • Example Nginx Configuration:

    location /api/v1/receive {
        # Reject malicious tenant IDs
        if ($http_thanos_tenant ~* "(\.\.)|(\.)") {
            return 403;
        }
        proxy_pass http://thanos_receive_backend;
    }
  • Disable Pruning (Not Recommended): If the pruning interval is configurable, increasing it significantly reduces the risk but does not eliminate it. This is not a secure fix.
  • 3. Detection

  • Log Monitoring: Monitor Thanos logs for os.RemoveAll calls or pruning events involving tenant IDs . or ...
  • Network Traffic Analysis: Look for HTTP POST requests to the Thanos Receive endpoint with THANOS-TENANT headers set to . or ...
  • Filesystem Monitoring: Use tools like auditd or inotify to monitor the Thanos data directory for mass deletion events.
  • Example Log Pattern (Thanos Logs):

    level=error ts=2026-12-04T12:00:00Z caller=pruner.go:123 msg="failed to prune tenant" tenant="." err="permission denied"

    (Note: The exact log message may vary, but the presence of tenant="." or tenant=".." in pruning logs is a strong IoC.)

    ⚠️ Urgency

  • CVSS Score: 7.4 (HIGH)
  • CISA KEV: No
  • Exploit Complexity: High (requires understanding of pruning lifecycle)
  • Patch Priority: HIGH
Recommendation: 1. Immediate: If Thanos Receive is exposed to untrusted networks, immediately restrict access via firewall or reverse proxy. 2. Short-Term: Upgrade to Thanos 0.42.6 or later as soon as possible. 3. Long-Term: Implement network segmentation and least-privilege access controls for all monitoring infrastructure.

Note: While the exploit complexity is high, the impact is severe (complete data loss). In environments where Thanos is exposed to the internet or untrusted internal networks, this should be treated as a critical vulnerability despite the "High" CVSS score.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="thanos-io Thanos"
CVSS Score
8.3 / 10 · CVSS HIGH
Weakness Types (CWE)
Affected Products (1)
thanos-io:Thanos (0.42.5)
References & Advisories (4)
Related CVEs
5.3
CVE-2026-144680
Thanos through 0.42.5 contains an authorization bypass vulnerability in Query that allows authenticated tenant
9.9
CVE-2026-77526
FacturaScripts is an open source accounting and invoicing software. From version 2025 to before version 2026.3
9.8
CVE-2026-145055
PraisonAI pip praisonai before 4.8.0, praisonaiagents and npm praisonai before 1.8.0, and praisonai-bot, prais
9.4
CVE-2026-129109
Calico installations managed by the Tigera Operator install a FlexVolume driver (nodeagent~uds/uds) on every L
9.4
CVE-2026-64883
Path traversal in the WebDAV interface (DotWebdavHelper and the WebDAV temporary-file COPY and MOVE handling)
8.6
CVE-2026-115524
Path traversal in the push-publish bundle receiver (BundlePublisherResource, /api/bundlePublisher/publish) in
8.3
CVE-2026-118326
Improper limitation of a pathname to a restricted directory in attendance photo upload workflow in ZKTeco BioT