Skip to content
Heist/ feed
Back to feed
High

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

Type: advisorySources: OSV

### 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` method to provide a collision-resistant hash function of your own and avoid calling `base.GetHashCollisionResistantEqualityComparer()`. 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 `M

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2024-48924
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 08:53 UTC · Revision 1

Source evidence

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

core-osv · Original source

Published 17 Oct 2024, 20:36 UTC

### 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` method to provide a collision-resistant hash function of your own and avoid calling `base.GetHashCollisionResistantEqualityComparer()`. 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 `M

osv:CVE-2024-48924
Complete source record
{
  "id": "52b9c84253b5ae10011856e8696b021f61bff66a86b266b71dd6bbc5dd406eb9",
  "url": "https://osv.dev/vulnerability/CVE-2024-48924",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "MessagePack allows untrusted data to lead to DoS attack due to hash collisions and stack overflow",
    "summary": "### 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` method to provide a collision-resistant hash function of your own and avoid calling `base.GetHashCollisionResistantEqualityComparer()`. 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 `M",
    "evidence": "osv:CVE-2024-48924",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2024-48924",
      "aliases": [
        "CVE-2024-48924",
        "GHSA-4qm4-8hg2-g2xm"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "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"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/messagepack-csharp/messagepack-csharp",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "f8d40b3ad0be01c6e56cb51ecea81f59d98c192d"
                },
                {
                  "introduced": "d1b45b00c8e632533ec898c44a793fe76d55b7f6"
                },
                {
                  "fixed": "8e599af0798b45008f8b293a7f233e4878f11ed5"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.5.187"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "introduced": "2.6.95-alpha"
                      },
                      {
                        "fixed": "3.0.214-rc.1"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "8e599af0798b45008f8b293a7f233e4878f11ed5"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "f8d40b3ad0be01c6e56cb51ecea81f59d98c192d"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v3.0.208-rc.1",
            "v2.5.172",
            "v3.0.134-beta",
            "v3.0.129-beta",
            "v2.5.171",
            "v3.0.111-alpha",
            "v2.5.168",
            "v3.0.54-alpha",
            "v2.5.140",
            "v2.5.129",
            "v2.5.108",
            "v2.5.124",
            "v2.6.100-alpha",
            "v2.6.95-alpha",
            "v2.5.103",
            "v2.4.59",
            "v2.5.94",
            "v2.4.35",
            "v2.4.23-alpha",
            "v2.3.85",
            "v2.1.115",
            "v2.3.75",
            "v2.2.113",
            "v2.2.85",
            "v2.2.60",
            "v2.1.194",
            "v2.1.165",
            "v2.1.152",
            "v2.1.143",
            "v2.1.90",
            "v2.1.80",
            "v2.0.270-rc",
            "v2.0.204-beta",
            "v2.0.123-beta",
            "v2.0.119-beta",
            "v2.0.110-alpha",
            "v2.0.94-alpha",
            "v1.7.3.4",
            "v1.7.3.3",
            "v1.7.3.2",
            "v1.7.3.1",
            "v1.7.3",
            "v1.7.2",
            "v1.7.0",
            "v1.6.2",
            "v1.6.1.2",
            "v1.6.1",
            "v1.6.0",
            "v1.5.1",
            "v1.5.0",
            "v1.4.4",
            "v1.4.2",
            "v1.4.1",
            "v1.4.0",
            "v1.3.3",
            "v1.3.2",
            "v1.3.1",
            "v1.3.0",
            "v1.2.3",
            "v1.2.1",
            "v1.2.0",
            "v1.1.2",
            "v1.1.1",
            "v1.0.3",
            "v1.0.2",
            "1.0.1",
            "0.2.0-beta",
            "0.1.0-beta"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-48924.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:50.598207608Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/48xxx/CVE-2024-48924.json",
        "https://github.com/MessagePack-CSharp/MessagePack-CSharp/security/advisories/GHSA-4qm4-8hg2-g2xm",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-48924",
        "https://github.com/MessagePack-CSharp/MessagePack-CSharp/commit/8e599af0798b45008f8b293a7f233e4878f11ed5",
        "https://github.com/MessagePack-CSharp/MessagePack-CSharp/commit/f8d40b3ad0be01c6e56cb51ecea81f59d98c192d"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-328"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/48xxx/CVE-2024-48924.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-48924",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 518808,
  "published_at": "2024-10-17T20:36:40.57+00:00"
}