{"id":"CVE-2026-48516","aliases":["AZL-113039","EUVD-2026-38380","GHSA-q2h6-ghwm-5qm8"],"status":"published","title":"MessagePack-CSharp: InterfaceLookupFormatter bypasses collision-resistant comparer settings","description":"MessagePack for C# is a MessagePack serializer for C#. Prior to 2.5.301 and 3.1.7, InterfaceLookupFormatter\u003cTKey,TElement\u003e constructs an internal Dictionary\u003cTKey, IGrouping\u003cTKey,TElement\u003e\u003e with the default equality comparer instead of the security-aware comparer supplied by options.Security.GetEqualityComparer\u003cTKey\u003e(). This formatter omission allows hash-collision CPU denial of service against ILookup\u003cTKey,TElement\u003e even when the application has opted into the untrusted-data security posture This vulnerability is fixed in 2.5.301 and 3.1.7.","severity":{"version":"4.0","score":6.3,"vector":"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","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00405,"percentile":0.3509,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-407"],"published":"2026-06-22T21:09:51Z","modified":"2026-11-10T14:18:01Z","fixes":[{"ecosystem":"NuGet","package":"MessagePack","fixed_in":["2.5.301","3.1.7"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"NuGet","package":"MessagePack","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.5.301"}]}]},{"source":"ghsa","ecosystem":"NuGet","package":"MessagePack","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0"},{"fixed":"3.1.7"}]}]},{"source":"osv","ecosystem":"Azure Linux:3","package":"python-msgpack","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"1.2.3-1"}]}]},{"source":"osv","ecosystem":"NuGet","package":"MessagePack","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.5.301"}]}],"versions":["0.1.0-beta","0.2.0-beta","0.2.1-beta","0.2.2-beta","0.2.3-beta","0.3.0-beta","0.4.0","0.4.1","0.4.2","0.5.0","0.6.0","0.6.1","0.7.0","0.7.2","0.8.0","0.8.1","0.8.2","0.8.3","0.8.4","0.8.5","1.0.0","1.0.1","1.0.2","1.0.3","1.1.0","1.1.1","1.1.1.1","1.1.2","1.2.0","1.2.0.1","1.2.0.2","1.2.1","1.2.2","1.2.3","1.3.0","1.3.1","1.3.1.1","1.3.2","1.3.3","1.4.0","1.4.1","1.4.2","1.4.3","1.4.4","1.5.0","1.5.0.1","1.5.0.2","1.5.1","1.6.0","1.6.0.1","1.6.0.2","1.6.0.3","1.6.1","1.6.1.1","1.6.1.2","1.6.2","1.7.0","1.7.1","1.7.2","1.7.3","1.7.3.1","1.7.3.2","1.7.3.3","1.7.3.4","1.7.3.7","1.8.71-beta","1.8.74","1.8.80","1.9.11","1.9.3","1.9.3-g129239b107","2.0.107-alpha","2.0.108-alpha","2.0.110-alpha","2.0.110-alpha-g1e44a9106f","2.0.119-beta","2.0.123-beta","2.0.171-beta","2.0.204-beta","2.0.221-beta","2.0.231-rc","2.0.270-rc","2.0.299-rc","2.0.323","2.0.335","2.1.115","2.1.143","2.1.152","2.1.165","2.1.194","2.1.80","2.1.90","2.2.113","2.2.36-alpha","2.2.44-rc","2.2.60","2.2.85","2.3.112","2.3.58-alpha","2.3.73-alpha","2.3.75","2.3.85","2.4.14-alpha","2.4.23-alpha","2.4.35","2.4.59","2.5.103","2.5.108","2.5.124","2.5.129","2.5.140","2.5.168","2.5.171","2.5.172","2.5.187","2.5.192","2.5.198","2.5.205","2.5.64-alpha","2.5.94"]},{"source":"osv","ecosystem":"NuGet","package":"MessagePack","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0"},{"fixed":"3.1.7"}]}],"versions":["3.0.111-alpha","3.0.129-beta","3.0.134-beta","3.0.208-rc-0001","3.0.3","3.0.300","3.0.308","3.0.54-alpha","3.1.0","3.1.1","3.1.2","3.1.3","3.1.4","3.1.5","3.1.6"]}],"products":[{"vendor":"messagepack","product":"messagepack"},{"vendor":"messagepack-csharp","product":"messagepack-csharp"}],"references":[{"url":"https://github.com/MessagePack-CSharp/MessagePack-CSharp/security/advisories/GHSA-q2h6-ghwm-5qm8","tags":["x_refsource_CONFIRM","Mitigation","Vendor Advisory","advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-48516","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-q2h6-ghwm-5qm8"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/48xxx/CVE-2026-48516.json","tags":["advisory"]},{"url":"https://github.com/MessagePack-CSharp/MessagePack-CSharp","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-48516","title":"MessagePack-CSharp: InterfaceLookupFormatter bypasses collision-resistant comparer settings","description":"MessagePack for C# is a MessagePack serializer for C#. Prior to 2.5.301 and 3.1.7, InterfaceLookupFormatter\u003cTKey,TElement\u003e constructs an internal Dictionary\u003cTKey, IGrouping\u003cTKey,TElement\u003e\u003e with the default equality comparer instead of the security-aware comparer supplied by options.Security.GetEqualityComparer\u003cTKey\u003e(). This formatter omission allows hash-collision CPU denial of service against ILookup\u003cTKey,TElement\u003e even when the application has opted into the untrusted-data security posture This vulnerability is fixed in 2.5.301 and 3.1.7.","status":"published","published":"2026-06-22T21:09:51.787Z","modified":"2026-06-25T15:54:33.529Z","cvss":[{"version":"4.0","score":6.3,"vector":"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","level":"medium","assessor":"cna"}],"cwes":["CWE-407"],"updated_at":"2026-11-02T13:50:49.872037Z"}],"euvd":[{"id":"EUVD-2026-38380","description":"MessagePack for C# is a MessagePack serializer for C#. Prior to 2.5.301 and 3.1.7, InterfaceLookupFormatter\u003cTKey,TElement\u003e constructs an internal Dictionary\u003cTKey, IGrouping\u003cTKey,TElement\u003e\u003e with the default equality comparer instead of the security-aware comparer supplied by options.Security.GetEqualityComparer\u003cTKey\u003e(). This formatter omission allows hash-collision CPU denial of service against ILookup\u003cTKey,TElement\u003e even when the application has opted into the untrusted-data security posture This vulnerability is fixed in 2.5.301 and 3.1.7.","status":"published","published":"2026-06-22T21:09:51Z","modified":"2026-06-25T15:54:33Z","cvss":[{"version":"4.0","score":6.3,"vector":"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","level":"medium"}],"updated_at":"2026-11-02T18:20:25.700423Z"}],"ghsa":[{"id":"GHSA-q2h6-ghwm-5qm8","title":"MessagePack-CSharp: InterfaceLookupFormatter bypasses collision-resistant comparer settings","description":"## Summary\n\n`InterfaceLookupFormatter\u003cTKey,TElement\u003e` constructs an internal `Dictionary\u003cTKey, IGrouping\u003cTKey,TElement\u003e\u003e` with the default equality comparer instead of the security-aware comparer supplied by `options.Security.GetEqualityComparer\u003cTKey\u003e()`.\n\nOther hash-based collection formatters use the security-aware comparer when `MessagePackSecurity.UntrustedData` is configured. This formatter omission allows hash-collision CPU denial of service against `ILookup\u003cTKey,TElement\u003e` even when the application has opted into the untrusted-data security posture.\n\n## Impact\n\nApplications are affected when they deserialize untrusted payloads into schemas containing `ILookup\u003cTKey,TElement\u003e` with a key type for which attacker-controlled hash collisions are feasible.\n\nUnder the default comparer, many colliding keys can degrade dictionary insertion from amortized constant time to quadratic behavior. A payload of colliding keys can consume CPU for a disproportionate amount of time. This bypasses the mitigation that developers intentionally enabled by using `MessagePackSecurity.UntrustedData`.\n\n## Affected components\n\n- Package: `MessagePack`\n- API: `InterfaceLookupFormatter\u003cTKey,TElement\u003e.Create`\n- Data type: `ILookup\u003cTKey,TElement\u003e`\n- Finding ID: `MESSAGEPACKCSHARP-041`\n\n## Patches\n\nFixes are prepared and will be released in coordinated patch versions.\n\nUpgrade guidance:\n\n1. Upgrade `MessagePack` to the patched version for your release line.\n2. Upgrade companion MessagePack packages in the same dependency graph to the coordinated patched versions.\n\nThe fix should create the internal dictionary with `options.Security.GetEqualityComparer\u003cTKey\u003e()`, matching the sibling dictionary and lookup formatter behavior.\n\n## Workarounds\n\nPatching is recommended.\n\nUntil a patched version is available, avoid exposing `ILookup\u003cTKey,TElement\u003e` in DTOs that deserialize untrusted data. Use collection shapes that are already protected by the security-aware comparer path, or validate and cap collection sizes at the transport boundary.\n\n## Resources\n\n- `MESSAGEPACKCSHARP-041`: `InterfaceLookupFormatter` missing security comparer\n- CWE-407: Inefficient Algorithmic Complexity","status":"published","published":"2026-06-25T21:29:39Z","modified":"2026-06-25T21:29:40Z","cvss":[{"version":"4.0","score":6.3,"vector":"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","level":"medium"}],"cwes":["CWE-407"],"updated_at":"2026-11-02T14:40:33.778544Z"}],"nvd":[{"id":"CVE-2026-48516","description":"MessagePack for C# is a MessagePack serializer for C#. Prior to 2.5.301 and 3.1.7, InterfaceLookupFormatter\u003cTKey,TElement\u003e constructs an internal Dictionary\u003cTKey, IGrouping\u003cTKey,TElement\u003e\u003e with the default equality comparer instead of the security-aware comparer supplied by options.Security.GetEqualityComparer\u003cTKey\u003e(). This formatter omission allows hash-collision CPU denial of service against ILookup\u003cTKey,TElement\u003e even when the application has opted into the untrusted-data security posture This vulnerability is fixed in 2.5.301 and 3.1.7.","status":"published","published":"2026-06-22T22:16:48.49Z","modified":"2026-06-25T17:16:39.54Z","cvss":[{"version":"4.0","score":6.3,"vector":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"medium","assessor":"secondary"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary"}],"cwes":["CWE-407"],"updated_at":"2026-11-02T14:12:25.288279Z"}],"osv":[{"id":"CVE-2026-48516","title":"MessagePack-CSharp: InterfaceLookupFormatter bypasses collision-resistant comparer settings","description":"MessagePack for C# is a MessagePack serializer for C#. Prior to 2.5.301 and 3.1.7, InterfaceLookupFormatter\u003cTKey,TElement\u003e constructs an internal Dictionary\u003cTKey, IGrouping\u003cTKey,TElement\u003e\u003e with the default equality comparer instead of the security-aware comparer supplied by options.Security.GetEqualityComparer\u003cTKey\u003e(). This formatter omission allows hash-collision CPU denial of service against ILookup\u003cTKey,TElement\u003e even when the application has opted into the untrusted-data security posture This vulnerability is fixed in 2.5.301 and 3.1.7.","status":"published","published":"2026-06-22T21:09:51.787Z","modified":"2026-10-28T02:30:51.485510386Z","cvss":[{"version":"4.0","score":6.3,"vector":"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","level":"medium"}],"cwes":["CWE-407"],"updated_at":"2026-11-02T15:45:06.701612Z"},{"id":"GHSA-q2h6-ghwm-5qm8","title":"MessagePack-CSharp: InterfaceLookupFormatter bypasses collision-resistant comparer settings","description":"## Summary\n\n`InterfaceLookupFormatter\u003cTKey,TElement\u003e` constructs an internal `Dictionary\u003cTKey, IGrouping\u003cTKey,TElement\u003e\u003e` with the default equality comparer instead of the security-aware comparer supplied by `options.Security.GetEqualityComparer\u003cTKey\u003e()`.\n\nOther hash-based collection formatters use the security-aware comparer when `MessagePackSecurity.UntrustedData` is configured. This formatter omission allows hash-collision CPU denial of service against `ILookup\u003cTKey,TElement\u003e` even when the application has opted into the untrusted-data security posture.\n\n## Impact\n\nApplications are affected when they deserialize untrusted payloads into schemas containing `ILookup\u003cTKey,TElement\u003e` with a key type for which attacker-controlled hash collisions are feasible.\n\nUnder the default comparer, many colliding keys can degrade dictionary insertion from amortized constant time to quadratic behavior. A payload of colliding keys can consume CPU for a disproportionate amount of time. This bypasses the mitigation that developers intentionally enabled by using `MessagePackSecurity.UntrustedData`.\n\n## Affected components\n\n- Package: `MessagePack`\n- API: `InterfaceLookupFormatter\u003cTKey,TElement\u003e.Create`\n- Data type: `ILookup\u003cTKey,TElement\u003e`\n- Finding ID: `MESSAGEPACKCSHARP-041`\n\n## Patches\n\nFixes are prepared and will be released in coordinated patch versions.\n\nUpgrade guidance:\n\n1. Upgrade `MessagePack` to the patched version for your release line.\n2. Upgrade companion MessagePack packages in the same dependency graph to the coordinated patched versions.\n\nThe fix should create the internal dictionary with `options.Security.GetEqualityComparer\u003cTKey\u003e()`, matching the sibling dictionary and lookup formatter behavior.\n\n## Workarounds\n\nPatching is recommended.\n\nUntil a patched version is available, avoid exposing `ILookup\u003cTKey,TElement\u003e` in DTOs that deserialize untrusted data. Use collection shapes that are already protected by the security-aware comparer path, or validate and cap collection sizes at the transport boundary.\n\n## Resources\n\n- `MESSAGEPACKCSHARP-041`: `InterfaceLookupFormatter` missing security comparer\n- CWE-407: Inefficient Algorithmic Complexity","status":"published","published":"2026-06-25T21:29:39Z","modified":"2026-06-25T21:56:26.281367Z","cvss":[{"version":"4.0","score":6.3,"vector":"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","level":"medium"}],"cwes":["CWE-407"],"updated_at":"2026-11-02T15:46:53.700556Z"},{"id":"AZL-113039","title":"CVE-2026-48516 affecting package python-msgpack 1.2.3-1","description":"MessagePack for C# is a MessagePack serializer for C#. Prior to 2.5.301 and 3.1.7, InterfaceLookupFormatter\u003cTKey,TElement\u003e constructs an internal Dictionary\u003cTKey, IGrouping\u003cTKey,TElement\u003e\u003e with the default equality comparer instead of the security-aware comparer supplied by options.Security.GetEqualityComparer\u003cTKey\u003e(). This formatter omission allows hash-collision CPU denial of service against ILookup\u003cTKey,TElement\u003e even when the application has opted into the untrusted-data security posture This vulnerability is fixed in 2.5.301 and 3.1.7.","status":"published","published":"2026-06-22T22:16:48Z","modified":"2026-11-10T14:18:01.807105084Z","updated_at":"2026-11-10T15:02:19.085067Z"}]}}
