cve.bz

CVE-2024-48924 messagepack-csharp messagepack-csharp: Use of Weak Hash

8.7 highEPSS 0.6%Fix available

High (8.7) in messagepack-csharp messagepack-csharp. EPSS 0.6% estimated probability of exploitation activity in the next 30 days. Fixed in MessagePack 2.5.187, 3.0.214-rc.1.

On this page
### Impact When this library is used to deserialize messagepack data from an untrusted source, there is a risk of a denial of service attack by an attacker that sends data contrived to produce hash collisions, leading to large CPU consumption disproportionate to the size of the data being deserialized. This is similar to [a prior advisory](https://github.com/MessagePack-CSharp/MessagePack-CSharp/security/advisories/GHSA-7q36-4xx7-xcxf), which provided an inadequate fix for the hash collision part of the vulnerability. ### Patches The following steps are required to mitigate this risk. 1. Upgrade to a version of the library where a fix is available. 1. Review the steps in [this previous advisory](https://github.com/MessagePack-CSharp/MessagePack-CSharp/security/advisories/GHSA-7q36-4xx7-xcxf) to ensure you have your application configured for untrusted data. ### Workarounds If upgrading MessagePack to a patched version is not an option for you, you may apply a manual workaround as follows: 1. Declare a class that derives from `MessagePackSecurity`. 2. Override the `GetHashCollisionResistantEqualityComparer<T>` method to provide a collision-resistant hash function of your own and avoid calling `base.GetHashCollisionResistantEqualityComparer<T>()`. 3. Configure a `MessagePackSerializerOptions` with an instance of your derived type by calling `WithSecurity` on an existing options object. 4. Use your custom options object for all deserialization operations. This may be by setting the `MessagePackSerializer.DefaultOptions` static property, if you call methods that rely on this default property, and/or by passing in the options object explicitly to any `Deserialize` method. ### References - Learn more about best security practices when reading untrusted data with [MessagePack 1.x](https://github.com/MessagePack-CSharp/MessagePack-CSharp/tree/v1.x#security) or [MessagePack 2.x](https://github.com/MessagePack-CSharp/MessagePack-CSharp#security). - The .NET team's [discussion on hash collision vulnerabilities of their `HashCode` struct](https://github.com/GrabYourPitchforks/runtime/blob/threat_models/docs/design/security/System.HashCode.md). ### For more information If you have any questions or comments about this advisory: * [Start a public discussion](https://github.com/MessagePack-CSharp/MessagePack-CSharp/discussions) * [Email us privately](mailto:andrewarnott@live.com)

Severity

CVSS 4.0

8.7 high
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
EPSS
0.6% (up from 0.4% a week ago; 0.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 42nd percentile. Scored 2026-11-25. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: yes · Technical impact: partial, assessed 2024-10-18. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-328 Use of Weak Hash
OWASP Top 10
A04:2025 Cryptographic Failures
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

  • MessagePack (NuGet): fixed in 2.5.187, 3.0.214-rc.1

Ask an AI about this CVE

Show the promptExplain CVE-2024-48924 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-48924?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-48924?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-48924 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
MessagePack-CSharp< 2.5.187
MessagePack-CSharp>= 2.6.95-alpha, < 3.0.214-rc.1

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-4qm4-8hg2-g2xmNuGetMessagePack<2.5.1872.5.187
GHSA-4qm4-8hg2-g2xmNuGetMessagePack>=2.6.95-alpha <3.0.214-rc.13.0.214-rc.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Azure Linux3python-msgpackno fix listedAZL-113006

From the distributions' data via OSV.dev: Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits.

Attack patterns (CAPEC)

  • CAPEC-68 Subvert Code-signing Facilities Likelihood: Low · Severity: Very High
  • CAPEC-461 Web Services API Signature Forgery Leveraging Hash Function Extension Weakness Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON