Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.2%top 86%

MessagePack-CSharp: InterfaceLookupFormatter bypasses collision-resistant comparer settings (CVE-2026-48516)

0
Medium
Published: 06/25/2026 (06/25/2026, 21:29:39 UTC)
Source: GCVE Database
Product: MessagePack

Description

MessagePack-CSharp's InterfaceLookupFormatter<TKey,TElement> constructs an internal dictionary using the default equality comparer instead of the security-aware comparer when deserializing ILookup<TKey,TElement>. This omission allows an attacker to craft payloads with colliding keys that degrade dictionary insertion performance, causing a CPU denial of service even when the application opts into untrusted-data security settings. The vulnerability affects versions of MessagePack prior to 2.5.301 and versions 3.0 up to but not including 3.1.7.

CVSS v4.0

Attack Vector
Network
Attack Complexity
High
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
Low
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Affected software

NuGetghsa
MessagePack
Affected versions
<2.5.301
NuGetghsa
MessagePack
Affected versions
>=3.0 <3.1.7

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 06/26/2026, 22:52:55 UTC

Technical Analysis

The InterfaceLookupFormatter<TKey,TElement> in MessagePack-CSharp creates an internal Dictionary<TKey, IGrouping<TKey,TElement>> with the default equality comparer rather than the security-aware comparer provided by options.Security.GetEqualityComparer<TKey>(). This contrasts with other hash-based collection formatters that correctly use the security-aware comparer when MessagePackSecurity.UntrustedData is enabled. As a result, deserializing untrusted payloads containing ILookup<TKey,TElement> with attacker-controlled colliding keys can cause hash collision-based CPU denial of service by degrading dictionary insertion performance from amortized constant time to quadratic time. Fixes are prepared to ensure the internal dictionary uses the security-aware comparer, aligning with sibling formatters.

Potential Impact

Applications deserializing untrusted data into ILookup<TKey,TElement> types with vulnerable MessagePack versions are susceptible to CPU denial of service via hash collision attacks. This bypasses the intended security posture of MessagePackSecurity.UntrustedData, potentially causing significant CPU resource consumption and degraded application performance. The impact is limited to scenarios where attacker-controlled keys can cause collisions under the default comparer.

Mitigation Recommendations

A patch is prepared and will be released in coordinated versions of MessagePack. Users should upgrade to the patched versions once available. Until then, avoid exposing ILookup<TKey,TElement> in data transfer objects deserializing untrusted data. Alternatively, use collection types that already employ the security-aware comparer or implement validation and size caps on collections at the transport boundary to mitigate potential denial of service.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-q2h6-ghwm-5qm8
Osv Schema Version
1.4.0
Aliases
["CVE-2026-48516"]
Ecosystems
["NuGet"]
Database Specific Severity
MODERATE
Cvss Version
4.0

Threat ID: 6a3ef7f327e9c79719036eda

Added to database: 06/26/2026, 22:06:43 UTC

Last enriched: 06/26/2026, 22:52:55 UTC

Last updated: 07/31/2026, 19:22:59 UTC

Views: 70

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses