☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
Thingsboard logo [ WEBSITE ] [ VENDOR STATS ]
CVSS: 5.3 🐛 CWE-791
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2025-9094

CVE-2025-9094 Improper Input Validation in Thingsboard
📅 PUBLISHED: 2025-08-17 22:32 UTC 🔄 UPDATED: 2026-09-23 20:31 UTC
[ ZERO-DAY / UNPATCHED ] [ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.30%
👁️
0.30% probability
7.5× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: UNKNOWN / CHECK VENDOR
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
5.3
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-9094 is a Server-Side Template Injection (SSTI) vulnerability in ThingsBoard 4.1, specifically within the "Add Gateway Handler" component. The vulnerability allows an attacker to inject malicious template expressions into the gateway handler, leading to improper neutralization of special elements used in a template engine. This can be exploited remotely without authentication, potentially leading to information disclosure or remote code execution depending on the template engine capabilities. The CVSS score is 4.3 (Medium), and the EPSS score is 0.0%, indicating low exploitation probability at this time. The vendor has acknowledged the issue and plans to release a fix in version 4.2.

⚡ 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

This vulnerability affects the ThingsBoard IoT platform, which is a Java-based application. The core package is not distributed via NPM, PyPI, Go, or Ruby registries, but rather as a standalone Java application or Docker container. The vulnerability lies in the custom gateway handler code, not in a third-party package dependency.

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Network (N) - The attack can be initiated remotely.
  • Attack Complexity (AC): Low (L) - No special conditions are required.
  • Privileges Required (PR): None (N) - No authentication is needed.
  • User Interaction (UI): None (N) - No user action is required.
  • Scope (S): Unchanged (U) - The vulnerability does not affect other components.
  • Confidentiality (C): Low (L) - Limited information disclosure is possible.
  • Integrity (I): None (N) - No data modification is possible.
  • Availability (A): None (N) - No denial of service is possible.

Threat Level: Medium. The vulnerability is remotely exploitable without authentication, but the impact is limited to low confidentiality impact. The public availability of exploit details increases the risk.

Deep Dive & Mechanics

The vulnerability exists in the "Add Gateway Handler" component of ThingsBoard 4.1. This handler processes requests to add new gateways to the platform. The flaw is a Server-Side Template Injection (SSTI) vulnerability, classified as CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine.

The handler likely takes user-supplied input (e.g., gateway name, configuration parameters) and passes it directly into a template engine (such as FreeMarker, Thymeleaf, or similar) without proper sanitization. An attacker can craft a malicious payload that includes template expressions (e.g., ${7*7} for FreeMarker or {{7*7}} for Thymeleaf) which are then evaluated by the server.

For example, if the gateway name is used in a template like Welcome, ${gatewayName}!, an attacker could set the gateway name to ${7*7} and the server would render Welcome, 49!. This confirms the injection point. More advanced payloads could read system properties, execute commands, or access internal data.

The attack flow:

  1. Attacker sends a crafted HTTP request to the ThingsBoard API endpoint responsible for adding gateways.
  2. The request contains a malicious payload in a parameter that is passed to the template engine.
  3. The template engine evaluates the payload, potentially executing arbitrary code or accessing sensitive data.
  4. The result is returned to the attacker in the response.

Vulnerable vs. Patched Code

Vulnerable Code (ThingsBoard 4.1):

// Hypothetical vulnerable code
public String addGateway(String gatewayName) {
    String template = "Gateway " + gatewayName + " added successfully.";
    TemplateEngine engine = new TemplateEngine();
    return engine.process(template);
}

Patched Code (Expected in v4.2):

// Hypothetical patched code
public String addGateway(String gatewayName) {
    String sanitized = StringEscapeUtils.escapeHtml4(gatewayName);
    String template = "Gateway " + sanitized + " added successfully.";
    TemplateEngine engine = new TemplateEngine();
    return engine.process(template);
}

The patched code sanitizes the input before passing it to the template engine, preventing template injection.

Exploitation & Lab Setup

Red Team

Lab Setup:

  1. Deploy ThingsBoard 4.1 using Docker: docker run -d --name thingsboard -p 8080:8080 thingsboard/tb:4.1.0
  2. Access the web interface at http://localhost:8080.

Exploitation Steps:

  1. Identify the vulnerable endpoint (e.g., /api/gateway).
  2. Craft a payload to test for SSTI. For FreeMarker (common in Java), use ${7*7}.
  3. Send a POST request with the payload:
curl -X POST http://localhost:8080/api/gateway \
  -H "Content-Type: application/json" \
  -d '{"name": "${7*7}", "type": "MQTT"}'
  1. If the response contains 49, the injection is successful.
  2. Escalate to read system properties:
curl -X POST http://localhost:8080/api/gateway \
  -H "Content-Type: application/json" \
  -d '{"name": "${@java.lang.System@getProperties()}", "type": "MQTT"}'

Blue Team

Detection Steps:

  1. Monitor for unusual HTTP requests to /api/gateway or similar endpoints.
  2. Look for payloads containing template expressions like ${...}, {{...}}, or *{...}.
  3. Check server logs for template evaluation errors or unexpected output.
  4. Implement input validation and sanitization for all user-supplied data.

Indicators of Compromise (IOCs)

  • Network IOCs:
    • HTTP requests to /api/gateway with JSON payloads containing template expressions.
    • Unusual response sizes or content (e.g., system properties in the response).
  • File IOCs:
    • Log entries showing template evaluation errors (e.g., FreeMarker template error).
  • System IOCs:
    • Unexpected processes or network connections from the ThingsBoard server.

Detection Engineering

YARA Rule

rule CVE_2025_9094_SSTI_Payload {
    meta:
        description = "Detects SSTI payloads targeting ThingsBoard CVE-2025-9094"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-9094"
    strings:
        $ssti1 = "${" ascii wide nocase
        $ssti2 = "{{" ascii wide nocase
        $ssti3 = "*{" ascii wide nocase
        $ssti4 = "#{" ascii wide nocase
        $ssti5 = "java.lang" ascii wide nocase
        $ssti6 = "Runtime" ascii wide nocase
        $ssti7 = "exec" ascii wide nocase
    condition:
        any of ($ssti*) and filesize < 10KB
}

Sigma Rule

title: CVE-2025-9094 - ThingsBoard SSTI Detection
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects HTTP requests with SSTI payloads targeting ThingsBoard
author: Valters IT
date: 2025-04-10
references:
    - CVE-2025-9094
logsource:
    category: webserver
    product: apache
    service: http
detection:
    selection:
        cs-method: 'POST'
        cs-uri-query|contains: '/api/gateway'
        cs-request-body|contains:
            - '${'
            - '{{'
            - '*{'
            - '#{'
    condition: selection
falsepositives:
    - Legitimate use of template expressions in other contexts
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-9094 - ThingsBoard SSTI Attempt"; flow:to_server; content:"POST"; http_method; content:"/api/gateway"; http_uri; content:"${"; http_client_body; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Upgrade to ThingsBoard v4.2 or later when released.
  2. Apply input validation and sanitization to all user-supplied data in the gateway handler.
  3. Disable the vulnerable endpoint if not required.

Long-term Actions:

  1. Implement a Web Application Firewall (WAF) to block SSTI payloads.
  2. Conduct regular security audits and penetration testing.
  3. Monitor for new patches and apply them promptly.

Workarounds:

  • If upgrade is not possible, restrict access to the gateway handler to trusted IPs only.
  • Use a reverse proxy to filter malicious requests.

Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-9094/ · 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.