CVE-2024-48924

See a problem?
Source
https://nvd.nist.gov/vuln/detail/CVE-2024-48924
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-48924.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-48924
Aliases
Published
2024-10-17T21:15:14Z
Modified
2024-10-18T23:46:12.592586Z
Summary
[none]
Details

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.
  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:

References

Affected packages

Git / github.com/messagepack-csharp/messagepack-csharp

Affected ranges

Type
GIT
Repo
https://github.com/messagepack-csharp/messagepack-csharp
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Fixed

Affected versions

0.*

0.1.0-beta
0.2.0-beta

1.*

1.0.1

v.*

v.1.7.3.5
v.1.7.3.6

v1.*

v1.0.2
v1.0.3
v1.1.1
v1.1.2
v1.2.0
v1.2.1
v1.2.3
v1.3.0
v1.3.1
v1.3.2
v1.3.3
v1.4.0
v1.4.1
v1.4.2
v1.4.3
v1.4.4
v1.5.0
v1.5.1
v1.6.0
v1.6.1
v1.6.1.2
v1.6.2
v1.7.0
v1.7.1
v1.7.2
v1.7.3
v1.7.3.1
v1.7.3.2
v1.7.3.3
v1.7.3.4
v1.7.3.7
v1.8.71-beta
v1.8.74
v1.8.80
v1.9.11
v1.9.3

v2.*

v2.0.110-alpha
v2.0.119-beta
v2.0.123-beta
v2.0.204-beta
v2.0.270-rc
v2.0.299-rc
v2.0.323
v2.0.335
v2.0.94-alpha
v2.1.115
v2.1.143
v2.1.152
v2.1.165
v2.1.194
v2.1.80
v2.1.90
v2.2.113
v2.2.36-alpha
v2.2.44-rc
v2.2.60
v2.2.85
v2.3.112
v2.3.58-alpha
v2.3.73-alpha
v2.3.75
v2.3.85
v2.4.14-alpha
v2.4.23-alpha
v2.4.35
v2.4.59
v2.5.103
v2.5.108
v2.5.124
v2.5.129
v2.5.140
v2.5.168
v2.5.171
v2.5.172
v2.5.64-alpha
v2.5.94
v2.6.100-alpha
v2.6.95-alpha

v3.*

v3.0.111-alpha
v3.0.129-beta
v3.0.134-beta
v3.0.208-rc.1
v3.0.54-alpha