CVE-2024-23684
Denial of service in CBOR library
Description
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 README for this library's repository 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.
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| com.upokecenter » cbor | >= 4.0.0, < 4.5.1 | 4.5.1 |
Blast radius
17% of the dependent artifacts (18) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 462 |
| 2 hops | 924 |
| 3 hops | 331 |
| 4 hops | 139 |
| 5 hops | 5 |
Most used dependents
- org.apereo.cas » cas-server-support-themes33 usages
- com.yubico » webauthn-server-core33 usages
- org.thingsboard.common » data26 usages
- com.yubico » yubico-util18 usages
- com.augustcellars.cose » cose-java18 usages
- org.thingsboard.common » message17 usages
- org.thingsboard.common » util17 usages
- com.yubico » webauthn-server-attestation15 usages
- org.thingsboard.common » queue15 usages
- org.eclipse.leshan » leshan-server-cf15 usages
- org.eclipse.leshan » leshan-client-cf11 usages
- org.eclipse.leshan » leshan-core11 usages
- decentralized-identity » did-common-java10 usages
- org.apereo.cas » cas-server-support-webauthn-core9 usages
- org.thingsboard.common » stats9 usages
Computed from the dependency graph of build 20261128.0605 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
References
| Advisory | NVD CVE-2024-23684 | nvd.nist.gov |
| Package | peteroupc/CBOR-Java | github.com |
| Web | peteroupc/CBOR-Java advisory GHSA-fj2w-wfgv-mwq6 | github.com |
| Web | advisories/vc-advisory-GHSA-fj2w-wfgv-mwq6 | vulncheck.com |
