Advisory Database
  • Advisories
  • Dependency Scanning
  1. nuget
  2. ›
  3. PeterO.Cbor
  4. ›
  5. GMS-2022-45

GMS-2022-45: Denial of service in CBOR library

January 21, 2022 (updated January 24, 2022)

Impact

Due to this library’s use of an inefficient algorithm, it is vulnerable to a denial of service attack when a maliciously crafted input is passed to DecodeFromBytes or other CBOR decoding mechanisms in this library.

Affected versions include versions 4.0.0 through 4.5.0.

This vulnerability was privately reported to me.

Patches

This issue has been fixed in version 4.5.1. Users should use the latest version of this library. (The latest version is not necessarily 4.5.1. Check the NuGet page to see the latest version’s version number.)

Workarounds

Again, users should use the latest version of this library.

In the meantime, note that the inputs affected by this issue are all CBOR maps or contain CBOR maps. An input that decodes to a single CBOR object is not capable of containing a CBOR map if—

  • it begins with a byte other than 0x80 through 0xDF, or
  • it does not contain a byte in the range 0xa0 through 0xBF.

Such an input is not affected by this vulnerability and an application can choose to perform this check before passing it to a CBOR decoding mechanism.

For more information

If you have any questions or comments about this advisory:

  • Open an issue in the CBOR repository.

References

  • github.com/advisories/GHSA-6r92-cgxc-r5fg
  • github.com/peteroupc/CBOR/commit/b4117dbbb4cd5a4a963f9d0c9aa132f033e15b95
  • github.com/peteroupc/CBOR/compare/v4.5...v4.5.1
  • github.com/peteroupc/CBOR/security/advisories/GHSA-6r92-cgxc-r5fg

Code Behaviors & Features

Detect and mitigate GMS-2022-45 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 4.0.0 before 4.5.1

Fixed versions

  • 4.5.1

Solution

Upgrade to version 4.5.1 or above.

Source file

nuget/PeterO.Cbor/GMS-2022-45.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:11 +0000.