CVE-2026-48513 MessagePack-CSharp: DynamicUnionResolver generated deserializers miss depth enforcement

Medium 6.3 Published Updated

Attackers can cause denial of service by sending deeply nested MessagePack data to applications using vulnerable C# union deserializers.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-48513?

CVE-2026-48513 is a medium-severity denial of service vulnerability in MessagePack-CSharp, published on 22 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

MessagePack for C# is a MessagePack serializer for C#. Prior to 2.5.301 and 3.1.7, runtime-generated union deserializers emitted by DynamicUnionResolver do not call MessagePackSecurity.DepthStep(ref reader) and do not decrement reader.Depth around recursive deserialization and skip paths. This means union deserialization does not consistently participate in the maximum object graph depth enforcement that protects other recursive formatter paths. For unknown union keys, the emitted deserializer calls reader.Skip() on attacker-controlled data without an enclosing depth step. This vulnerability is fixed in 2.5.301 and 3.1.7.

Weakness: CWE-674

Which versions are affected by CVE-2026-48513?

4 open source packages ship an affected version, including MessagePack. It affects 1 product.

PackageAffectedFixed in
MessagePack NuGetAll versions2.5.301
MessagePack NuGetAll versions2.5.301
MessagePack NuGetFrom 3.03.1.7
MessagePack NuGetFrom 3.03.1.7

Products include Messagepack Messagepack.

How do I fix CVE-2026-48513?

Upgrade MessagePack to a fixed version for your release line: 2.5.301 or 3.1.7.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2026-48513 being exploited?

There is no known exploitation of CVE-2026-48513 in the wild and no public exploit code.

Sources

Also known as ECHO-5e40-0e95-a20e, GHSA-wfr3-xj75-pfwh.

Is CVE-2026-48513 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free