CVE Watchtower

CVE-2026-48502MessagePack Out-of-bounds Read

NVD

Vulnerability Summary

## Summary

`MessagePackReader.ReadDateTime()` can allocate stack memory based on an attacker-controlled MessagePack extension length. In the slow path for timestamp extension parsing, the computed `tokenSize` includes the extension body length from the wire and is used in a `stackalloc` operation before the extension length is validated as one of the valid timestamp sizes.

A very small payload can claim a large timestamp extension body and cause a stack allocation large enough to trigger an uncatchable `StackOverflowException`, terminating the host process.

## Impact

Applications are affected when they deserialize untrusted payloads into types containing `DateTime` values. This path is available through the standard formatter set and does not require opting into typeless serialization, LZ4 compression, Unity-specific resolvers, or other specialized features.

`MessagePackSecurity.UntrustedData` and `MaximumObjectGraphDepth` do not mitigate this issue because the crash is caused by a single-frame stack allocation, not by object graph recursion.

An attacker can send a MessagePack timestamp extension header with an oversized body length and insufficient body bytes. The reader enters the slow path, attempts to stack-allocate a buffer sized from that declared length, and can terminate the process before a catchable serialization exception is thrown.

## Affected components

- Package: `MessagePack`
- API: `MessagePackReader.ReadDateTime`
- Data types: `DateTime` and formatter paths that call `ReadDateTime`
- Finding IDs: `MESSAGEPACKCSHARP-020`, related stack allocation finding `MESSAGEPACKCSHARP-CROW-MEM-001`

## Patches

Fixes are prepared and will be released in coordinated patch versions.

Upgrade guidance:

1. Upgrade `MessagePack` to the patched version for your release line.
2. Upgrade companion MessagePack packages in the same dependency graph to the coordinated patched versions.

The fix should validate timestamp extension lengths before any stack allocation. Valid MessagePack timestamp payload lengths are limited to the supported timestamp encodings, so oversized extension lengths should fail with a catchable MessagePack serialization exception before the slow path allocates a buffer.

## Workarounds

Patching is recommended.

Until a patched version is available, avoid deserializing untrusted MessagePack payloads into schemas that contain `DateTime` or `DateTimeOffset` values. Where possible, enforce strict maximum message sizes and reject malformed extension payloads before they reach MessagePack-CSharp.

There is no complete workaround for applications that must deserialize attacker-controlled MessagePack data containing date/time fields with affected versions.

## Resources

- `MESSAGEPACKCSHARP-020`: `ReadDateTime` stack allocation from attacker-controlled extension length
- `MESSAGEPACKCSHARP-CROW-MEM-001`: related attacker-controlled stack allocation finding in `MessagePackReader`
- CWE-770: Allocation of Resources Without Limits or Throttling

## CVE split rationale

This vulnerability is independently fixable in the DateTime extension parsing path by validating extension lengths before stack allocation. It is separate from recursive stack overflows, LZ4 issues, and collection allocation bugs.
Severity Level
HIGH
Published Date
Jun 22, 2026
Last Modified
Jun 25, 2026
Exploitation Status
No confirmed exploitation yet
CVE Record Status
Published
EPSS Score (30-Day)
0.26%Probability
Root Weakness (CWE)
The software reads data past the end, or before the beginning, of the intended buffer.
The product performs a calculation that can produce an integer overflow or wraparound when the logic assumes the resulting value will always be larger than the original.
An algorithm in a product has an inefficient worst-case computational complexity that may be detrimental to system performance and can be triggered by an attacker, typically using crafted manipulations that ensure that the worst case is being reached.
The product does not handle or incorrectly handles a compressed input with a very high compression ratio that produces a large output.
The product uses external input with reflection to select which classes or code to use, but it does not sufficiently prevent the input from selecting improper classes or code.
The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.
The product does not properly control the amount of recursion that takes place, consuming excessive resources.
The product allocates memory based on an untrusted, large size value, but it does not ensure that the size is within expected limits, allowing arbitrary amounts of memory to be allocated.
The product initializes or sets a resource with a default that is intended to be changed by the administrator, but the default is not secure.
CVSS v4.0 Base Metrics — Score 8.2
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Attack VectorNetwork
Attack ComplexityHigh
Attack RequirementsPresent
Privileges RequiredNone
User InteractionNone
Confidentiality (Vulnerable System)None
Integrity (Vulnerable System)None
Availability (Vulnerable System)High
Confidentiality (Subsequent System)None
Integrity (Subsequent System)None
Availability (Subsequent System)None

Affected & Patched Versions

Affected Versions
  • MessagePack >= 3.0, < 3.1.7
Patched Versions
No patched version published yet
Until a fix ships, reduce exposure:
  • Restrict access to the affected service or interface to trusted networks.
  • Disable the affected feature if you do not need it.
  • Watch the vendor advisory for a firmware or software update.

What to do

Plan remediation soon. No exploitation is confirmed yet, but the severity is high.

  1. Check whether you run MessagePack and which version.
  2. No patched version is listed yet. Limit access to the affected service to trusted networks, and disable the feature if you can.
  3. Subscribe to the vendor advisory so you learn when a fix ships.

Timeline

  • Jun 22, 2026Published
  • Jun 25, 2026Record last modified

Score, severity and exploitation changes are tracked from the day Watchtower started logging them.

Get notified about new MessagePack CVEsYou are reading CVE-2026-48502. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alerts

Data last checked: Sep 23, 2026 13:57 UTC