cbor2 is vulnerable to Denial of Service (DoS)
53
Medium Risk
The Rust-based decoder accumulates indefinite-length and large definite-length byte and text strings by concatenating each decoded chunk onto the running result with +, reallocating and copying the whole buffer on every chunk. Decoding attacker-supplied CBOR that uses many indefinite-length chunks or very large strings therefore takes time quadratic in the input size. An attacker who can submit CBOR to a decoder can force excessive CPU consumption and stall processing with a moderately sized payload. The fix builds each string once using writer-based accumulation and validates indefinite-string chunk sizes.
You are affected if you are using a version that falls within the vulnerable range and decoding CBOR data from untrusted sources.
cbor2 is vulnerable to Denial of Service (DoS) in versions 6.0.0 - 6.1.2.
Upgrade the cbor2 library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant