Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
.NET NuGet

GHSA-4qm4-8hg2-g2xm

MessagePack allows untrusted data to lead to DoS attack due to hash collisions and stack overflow

Also known asCVE-2024-48924
Published
Oct 17, 2024
Updated
Nov 28, 2024
Affected
2 pkgs
Patched
2 / 2
Exploits
None indexed

EPSS Exploitation Probability

via FIRST.org ↗
0.4%probability of exploitation in next 30 days
Lower Risk27th percentile+0.25%
0.00%0.29%0.57%0.86%0.1%0.4%Dec 25Apr 26Jun 26

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

Blast Radius

2 pkgs affected
.NETMessagePack.NETMessagePack

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects NuGet packages — download data is not available via public APIs for these ecosystems.

Description

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, 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. If upgrading from v1, check out our migration guide.
  2. Review the steps in this previous advisory 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

For more information

If you have any questions or comments about this advisory:

Affected Packages

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
.NETNuGetMessagePackall versions2.5.187
.NETNuGetMessagePack2.6.95-alpha&&< 3.0.214-rc.13.0.214-rc.1

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for MessagePack. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update MessagePack to 2.5.187 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-4qm4-8hg2-g2xm is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-4qm4-8hg2-g2xm is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-4qm4-8hg2-g2xm. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### 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.
O3 Security · Impact-Aware SCA

Is GHSA-4qm4-8hg2-g2xm in your dependencies?

O3 detects GHSA-4qm4-8hg2-g2xm across NuGet dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.