GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [security disclosure] Unbounded Recursion in `unpackValue()` — Recoverable StackOverflow DoS · Issue #1015 · msgpack/msgpack-java

[security disclosure] Unbounded Recursion in unpackValue() — Recoverable StackOverflow DoS #1015

New issue
Copy link
New issue
Copy link
Open
#1026
Open
[security disclosure] Unbounded Recursion in unpackValue() — Recoverable StackOverflow DoS#1015
#1026
Copy link

Description

@waydeshi
waydeshi
opened on Aug 7, 2026
Issue body actions
Field Value
Project msgpack-java
Repository https://github.com/msgpack/msgpack-java
Affected Version 0.9.12 (and earlier)
Component msgpack-core
Class org.msgpack.core.MessageUnpacker
File msgpack-core/src/main/java/org/msgpack/core/MessageUnpacker.java
Vulnerable Line(s) 646–663
Severity Medium
CVSS 3.1 Score Base Score: 5.3 (MEDIUM) — CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
CWE CWE-674 (Uncontrolled Recursion)

An unauthenticated remote attacker sends a small payload of deeply nested fixarray[1] structures to trigger a StackOverflowError in the deserializing thread. StackOverflowError extends Error, so catch (IOException) and catch (MessagePackException) do not intercept it and the request fails. Availability is Low: the error is recoverable, the worker thread stays alive, and a top-level catch (Throwable) survives it. No data is read or modified.


Impact

Denial of service via a recoverable per-request deserialization failure.

  • Escapes typed catch blocks: catch (IOException) / catch (MessagePackException) miss the StackOverflowError.
  • Recoverable: the worker thread survives, the stack unwinds cleanly, and frameworks with catch (Throwable) recover fully. Impact is a per-request failure, not thread-pool exhaustion.
  • Minimal payload: crash depth ≈1,500 with -Xss512k (1,501-byte payload) and ≈11,000 with the default stack (≈11 KB payload), both within typical HTTP body limits.

Remediation

Option 1 — Add maxNestingDepth to UnpackerConfig (recommended):

private int maxNestingDepth = 512; // UnpackerConfig field

public ImmutableValue unpackValue() throws IOException {
    return unpackValue(0);
}

private ImmutableValue unpackValue(int depth) throws IOException {
    if (depth > config.getMaxNestingDepth()) {
        throw new MessageSizeException("Nesting depth exceeds limit: " + depth, depth);
    }
    // ARRAY/MAP cases call unpackValue(depth + 1)
}

Option 2 — Convert to an iterative implementation using an explicit Deque stack, removing JVM-stack usage for nesting.


References

  • msgpack-core/src/main/java/org/msgpack/core/MessageUnpacker.java, lines 646–663
  • CWE-674: https://cwe.mitre.org/data/definitions/674.html
  • MessagePack array format: https://github.com/msgpack/msgpack/blob/master/spec.md#array-format-family
  • Similar issue: CVE-2023-1370 (json-smart, unbounded nesting → StackOverflow DoS)

Activity

  1. waydeshi commented on Sep 16, 2026

    @waydeshi
    waydeshi
    on Sep 16, 2026
    Author
    More actions

    https://www.cve.org/CVERecord?id=CVE-2026-90472 is published for this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.