[php-src] Issue #24934: [SECURITY] BUG-109: Cryptographic - Insecure Random Number Generation

From: Date: Wed, 28 Oct 2026 01:51:22 +0000
Subject: [php-src] Issue #24934: [SECURITY] BUG-109: Cryptographic - Insecure Random Number Generation
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-253388@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/24934 Author: Codeleafly ## 🐛 Security Bug Report **Bug ID:** BUG-109 **Category:** Cryptographic **Subcategory:** Insecure Random Number Generation **Severity:** Medium **CWE:** CWE-338 **CVSS Score:** 5.0 **File:** ext/standard/mt_rand.c **Line:** multiple **Status:** UNFIXED **Verified:** False ### Description rand(), srand(), mt_rand() use weak PRNG algorithms predictable by attackers. Not cryptographically secure. ### Impact Predictable session tokens, CSRF tokens, reset passwords, encryption keys. ### Remediation Use PHP's random_bytes() or openssl_random_pseudo_bytes() for cryptographic purposes. ### Exploitability Local or remote depending on usage ### Source - Repository: https://github.com/php/php-src/ - Branch: master - Analysis Date: 2026-10-27T16:38:37.937347Z --- *Auto-generated from static security analysis of php-src.* *Total bugs found: 161*

« previous php.bugs (#253388) next »