CVE-2026-42881: Quncompress Missing Size Validation

Directly calling `qUncompress` on data read from an external source without validating the 4-byte expected size header can lead to massive memory allocation and resource exhaustion (DoS/Zip Bomb). Extract the first 4 bytes of the data and check the uncompressed size against a safe limit before uncompressing.

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0C++
greprules fetch cve-2026-42881-quncompress-missing-size-validation --engine opengrep

Description

Directly calling `qUncompress` on data read from an external source without validating the 4-byte expected size header can lead to massive memory allocation and resource exhaustion (DoS/Zip Bomb). Extract the first 4 bytes of the data and check the uncompressed size against a safe limit before uncompressing.