CVE-2025-52891: Insecure Libinjection Return Check

Evaluating the return value of libinjection_sqli or libinjection_xss directly as a boolean or against 0 is unsafe. Libinjection v4 introduces non-zero error codes that leave output buffers uninitialized. If these error codes are treated as positive detections, it causes out-of-bounds reads on uninitialized buffers, which can lead to information disclosure or

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0C++β
greprules fetch cve-2025-52891-insecure-libinjection-return-check --engine opengrep

Description

Evaluating the return value of libinjection_sqli or libinjection_xss directly as a boolean or against 0 is unsafe. Libinjection v4 introduces non-zero error codes that leave output buffers uninitialized. If these error codes are treated as positive detections, it causes out-of-bounds reads on uninitialized buffers, which can lead to information disclosure or