CVE-2024-45751: Insecure Rand Memory Population

Use of the insecure `rand()` function to populate an array or pointer. `rand()` is deterministic and not cryptographically secure. For authentication challenges, session IDs, or cryptographic keys, this can lead to prediction or replay attacks. Use a CSPRNG like `getrandom()`.

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0Cβ
greprules fetch cve-2024-45751-insecure-rand-memory-population --engine opengrep

Description

Use of the insecure `rand()` function to populate an array or pointer. `rand()` is deterministic and not cryptographically secure. For authentication challenges, session IDs, or cryptographic keys, this can lead to prediction or replay attacks. Use a CSPRNG like `getrandom()`.