CVE Professor
/
All CVEs
CVE-2026-61657

CVE-2026-61657 — Ndsev Zserio (< 2.18.2) — CWE-789

HIGH CVSS 7.5 CVE.org

Zserio is a framework for serializing structured data with a compact and efficient way with low overhead. The fix for GHSA-cwq5-8pvq-j65j shipped in zserio-runtime 2.18.1 is incomplete. Prior to version 2.18.2, the new bounds check in Array.read() is gated on arrayTraits.isBitSizeOfConstant(), which returns false for variable-size element types including strings and complex structs. For those types the check is never reached, rawArray.reset(readSize) executes unconditionally with an attacker-controlled value, and a 5-byte payload declaring Integer.MAX_VALUE elements causes an attempted ~16 GB heap allocation that crashes any process parsing untrusted zserio data — with no authentication required. This issue has been patched in version 2.18.2.

Zserio is a framework for serializing structured data with a compact and efficient way with low overhead. The fix for GHSA-cwq5-8pvq-j65j shipped in zserio-runtime 2.18.1 is incomplete. Prior to version 2.18.2, the new bounds check in Array.read() is gated on arrayTraits.isBitSizeOfConstant(), which returns false for variable-size element types including strings and complex structs. For those types the check is never reached, rawArray.reset(readSize) executes unconditionally with an attacker-controlled value, and a 5-byte payload declaring Integer.MAX_VALUE elements causes an attempted ~16 GB heap allocation that crashes any process parsing untrusted zserio data — with no authentication required. This issue has been patched in version 2.18.2.

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

🎯 What is this vulnerability?

CVE‑2026‑61657 – “Zserio array‑size OOM”

AttributeValue
CWECWE‑789 *Out‑of‑bounds Write / Improper Input Validation*
CVSS 3.1AV:N / AC:L / PR:N / UI:N / S:U / C:N / I:N / A:H → 7.5 (HIGH)
Affected componentArray.read() in the zserio‑runtime library (≤ 2.18.1)

| Root cause | The newly‑added bounds‑check that should prevent an attacker‑controlled readSize from being used to allocate a raw array is only executed when arrayTraits.isBitSizeOfConstant() returns true. For variable‑size element types (e.g., string, nested structs, any type whose bit‑size is not a compile‑time constant) this method returns false, so the guard is skipped. The code then unconditionally executes rawArray.reset(readSize), where readSize is taken directly from the serialized payload. Supplying a maliciously large readSize (e.g., Integer.MAX_VALUE) forces the runtime to attempt a ~16 GiB heap allocation, which on a typical JVM results in an Out‑of‑Memory (OOM) crash of the process that is parsing the untrusted Zserio data.

Why the CVSS vector looks the way it does

  • AV:N – The attack can be launched remotely; the attacker only needs to supply a crafted Zserio binary (e.g., via a network service, file upload, or any API that deserialises Zserio data).
  • AC:L – No special privileges, timing, or computational effort are required; the payload is a few bytes.
  • PR:N / UI:N – No authentication or user interaction is needed.
  • S:U – The vulnerability does not depend on a particular privilege level of the victim process; any process that loads the vulnerable runtime is affected.
  • C:N / I:N – The flaw does not expose data or allow modification of data directly.
  • A:H – The impact is a complete denial of service (process crash) because the JVM runs out of heap memory.
  • In short: a missing bounds‑check for variable‑size array elements leads to an uncontrolled heap allocation → guaranteed OOM → denial‑of‑service.


    ⚡ Attack Chain

    Below is a realistic, end‑to‑end exploitation flow. All code snippets are illustrative; the exact network endpoint that consumes Zserio data is not disclosed in the CVE, so replace http://target/api/deserialize with the real service URL.

    1. Discovery & Reconnaissance

    StepTechniqueWhat the attacker learns
    a. Identify the libraryPassive fingerprinting (e.g., examining HTTP User‑Agent, X‑Powered‑By, or Java stack traces in error pages) or active probing (sending a benign Zserio payload and observing the response).Detects that the target runs zserio‑runtime and extracts the version from the error message or from a pom.xml/build.gradle file that is sometimes exposed in public repositories.
    b. Version enumerationQuery a public artifact repository (Maven Central) for the exact version used, or leverage a known “leak” (e.g., a META-INF/MANIFEST.MF containing Implementation-Version).Confirms the runtime version is < 2.18.2 (e.g., 2.17.5). This version is vulnerable.
    c. Verify vulnerabilitySend a minimal Zserio payload that triggers the OOM path (see PoC below) and watch for a java.lang.OutOfMemoryError or a process termination.Confirms the presence of CVE‑2026‑61657.

    2. Exploitation

    Goal: Force the vulnerable process to allocate ~16 GiB and crash.

    2.1. Payload construction

    The vulnerable code path is Array.read() for an array of a variable‑size element (e.g., string). The serialized format for a Zserio array (simplified) is:

    [uint32] elementCount   // number of elements
    [<element data> ...]    // repeated `elementCount` times

    Array.read() reads elementCount into readSize and then calls rawArray.reset(readSize). The fix in 2.18.1 added a check only when arrayTraits.isBitSizeOfConstant() is true. For string this flag is false, so the check is bypassed.

    A 5‑byte malicious payload is enough:

    OffsetBytes (hex)Meaning
    0‑3FF FF FF 7FInteger.MAX_VALUE (0x7FFFFFFF) – the element count
    400First byte of the first (non‑existent) string length – the parser will never get that far because the allocation fails first.

    2.2. PoC (illustrative)

    # Bash + curl example – replace the URL with the actual endpoint that deserialises Zserio data
    # The payload is written to a temporary file (payload.bin)
    printf '\xFF\xFF\xFF\x7F\x00' > payload.bin
    
    curl -X POST "http://target.example.com/api/deserialize" \
         -H "Content-Type: application/octet-stream" \
         --data-binary @payload.bin \
         -o /dev/null -s -w "%{http_code}\n"

    What happens on the server

    1. The endpoint reads the incoming bytes into a ByteArrayInputStream.
    2. Array.read() extracts readSize = 0x7FFFFFFF.
    3. Because the element type is a string, arrayTraits.isBitSizeOfConstant() returns false.
    4. The bounds‑check (if (readSize > MAX_ELEMENTS) throw …) is skipped.
    5. rawArray.reset(readSize) attempts to allocate an internal int[] (or Object[]) of length 2 147 483 647.
    6. The JVM tries to reserve ~16 GiB of heap → OutOfMemoryError → the process aborts (or is killed by the OS OOM killer).

    Result: The service becomes unavailable for all users until it is restarted.

    3. Post‑exploitation

    Because the CVSS vector indicates Availability‑only impact, the attacker’s end‑goal is simply Denial‑of‑Service. However, in a multi‑tenant environment the crash can be leveraged for secondary effects:

    ScenarioHow the crash helps the attacker
    a. Service disruptionRepeated OOM crashes force the operator to restart the service, causing downtime and possibly SLA penalties.
    b. Resource exhaustionIf the service runs inside a container orchestrator (Kubernetes), the OOM kill may trigger a pod restart loop, exhausting cluster resources.
    c. Crash‑dump analysisIf the process is configured to write core dumps, an attacker who can retrieve the dump (e.g., via a mis‑configured log‑aggregation endpoint) may gain memory snapshots that contain sensitive data.
    d. Lateral impactIn a monolithic Java application that also hosts authentication or business‑logic code, the crash can be used as a cover for other attacks (e.g., timing‑based side‑channel, or to force a fallback to an insecure component).

    No direct privilege escalation, code execution, or data leakage is guaranteed by the vulnerability itself.


    🌍 Real‑World Impact

    CIA TriadImpact (derived from CVSS)
    Confidentiality (C)None – the flaw does not expose data.
    Integrity (I)None – the attacker cannot modify persisted data.
    Availability (A)High – the attacker can reliably crash any process that parses untrusted Zserio data, leading to full service outage.

    Practical consequences

  • Public‑facing APIs that accept binary payloads (e.g., telemetry ingestion, remote procedure calls, file‑upload services) become a single‑packet DoS vector.
  • Internal services that exchange Zserio messages (e.g., micro‑service communication, IoT gateways) can be taken down by a compromised client or a malicious insider.
  • Embedded devices using the Java runtime (e.g., Android apps, automotive ECUs with Java VM) may experience a hard crash, potentially causing safety‑critical failures if the device does not gracefully restart.
  • Cloud‑native deployments may suffer from cascading restarts, increased CPU/memory pressure, and possible cost spikes.

  • 🛡️ Remediation & Mitigation

    1. Patch / Upgrade

    ActionDetails
    UpgradeMove to zserio‑runtime ≥ 2.18.2. The fix removes the isBitSizeOfConstant() gating and always validates readSize against a safe upper bound before allocation.
    Version rangeAll versions < 2.18.2 (including 2.18.1, 2.18.0, 2.17.x, …) are vulnerable.

    2. Workarounds (if immediate upgrade is not possible)

    WorkaroundHow to applyEffectiveness
    Input size validation at the application layerBefore passing any byte stream to Zserio deserialization, read the first 4 bytes (the array element count) and reject values larger than a sane threshold (e.g., 10 000). Example in Java: <br><br>``java<br>DataInputStream dis = new DataInputStream(inStream);<br>int count = dis.readInt();<br>if (count < 0count > 10_000) { throw new IllegalArgumentException("Array size too large"); }<br>// rewind stream or reconstruct a new InputStream that includes the 4 bytes again<br>`Partial – mitigates the specific OOM path but does not protect against other malformed Zserio structures.
    JVM heap limitsRun the vulnerable service with a strict maximum heap (e.g., -Xmx512m). The OOM will still happen, but the process will be killed quickly, limiting the amount of memory the attacker can force the JVM to request.Low – still a denial‑of‑service, but reduces collateral impact on the host.
    Network‑level throttlingDeploy a WAF or reverse‑proxy rule that caps the request body size for the endpoint that consumes Zserio data. Example ModSecurity rule (illustrative): <br><br>SecRule REQUEST_HEADERS:Content-Type "application/octet-stream" "phase:2,ctl:requestBodyProcessor=XML,ctl:requestBodyAccess=On,ctl:requestBodyLimit=4096,log,deny,status:413"Effective if the endpoint only ever receives small Zserio messages. The rule must be tuned to the legitimate maximum size.
    Container / orchestration limitsSet memory limits (memory: "1Gi"` in a Kubernetes pod spec) and enable OOM‑score‑adj to ensure the vulnerable container is the first to be killed, preserving other workloads.Mitigates impact on the overall cluster but does not stop the crash.

    3. Detection

    IndicatorWhere it appearsExample log line
    Java OOM exceptionApplication logs, stderr, or container logsjava.lang.OutOfMemoryError: Java heap space
    Process terminationSystemd journal, Docker/K8s eventssystemd[1]: zserio-service.service: Main process exited, code=exited, status=134/FAILURE
    Sudden increase in request body sizeReverse‑proxy (NGINX, Apache) access logsPOST /api/deserialize 200 0 "-" "curl/7.88.1" 5242880 (5 MiB payload, far above normal)
    Core dump generation (if enabled)Filesystem under /var/crash/ or container volumecore.zserio-service.12345
    Repeated restartsKubernetes kubectl get pods shows CrashLoopBackOffzserio-service-5d9f7c9d9f-abcde 0/1 CrashLoopBackOff 5m30s

    SIEM rule (pseudo‑SQL)

    SELECT *
    FROM logs
    WHERE message LIKE '%OutOfMemoryError%'
       OR message LIKE '%CrashLoopBackOff%'
       OR (request_path = '/api/deserialize' AND request_body_bytes > 4096)

    ⚠️ Urgency

  • CVSS 7.5 (High) – Availability‑only but guaranteed crash with a single packet.
  • Exploit complexity – Low (no auth, no user interaction, trivial payload).
  • Public exposure – Many services expose binary deserialization endpoints (e.g., telemetry, remote configuration).
  • No CISA KEV listing – The vulnerability is not yet in the “Known Exploited Vulnerabilities” catalog, but the low barrier to exploitation makes it a high‑priority candidate for rapid weaponisation.
Patch priority recommendation:
EnvironmentRecommended action
Production services exposed to the InternetImmediate – Deploy version ≥ 2.18.2 or apply the input‑validation workaround and enforce strict request‑size limits.
Internal micro‑servicesHigh – Upgrade within the next maintenance window; in the meantime, add size checks and memory limits.
Embedded / offline devicesMedium – If the device cannot be patched quickly, consider disabling any feature that accepts external Zserio payloads or enforce a hard‑coded maximum element count in the firmware.

Given the triviality of the exploit and the certainty of a denial‑of‑service, organizations should treat CVE‑2026‑61657 as a critical operational risk and prioritize remediation accordingly.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="ndsev zserio"
CVSS Score
7.5 / 10 · CVSS HIGH
Weakness Types (CWE)
CWE-789
Affected Products (1)
ndsev:zserio (< 2.18.2)
References & Advisories (2)
Related CVEs
7.1
CVE-2026-144683
plv8 through 3.2.5 contains an unbounded stack allocation vulnerability in GetJsonbValue that allows low-privi
6.0
CVE-2026-144664
MariaDB Server before 10.6.25, 10.7 through 10.11.x before 10.11.16, 11.0 through 11.4.x before 11.4.10, 11.5
5.3
CVE-2026-145063
Trigger.dev before 4.8.6 does not enforce a request body size limit on its single sign-on endpoint, allowing t
4.6
CVE-2026-144454
Signal-Android 4.71.0 before 7.56.5 contains an uncontrolled memory allocation vulnerability in its APNG decod
6.9
CVE-2026-142186
Glide through 4.2.1 contains a resource limit bypass vulnerability that allows remote unauthenticated attacker
6.5
CVE-2026-142316
Gonic through 0.23.0 contains a memory exhaustion vulnerability in the POST /admin/change_avatar_do handler th
5.5
CVE-2026-142234
gopacket before 1.7.5 contains a denial of service vulnerability in the pcapgo capture file readers that allow