[php-src] Issue #24933: [SECURITY] BUG-108: Cryptographic - Insecure Random Number Generation
| From: | Codeleafly | Date: | Wed, 28 Oct 2026 01:51:21 +0000 |
| Subject: | [php-src] Issue #24933: [SECURITY] BUG-108: Cryptographic - Insecure Random Number Generation | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-253387@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/24933
Author: Codeleafly
## 🐛 Security Bug Report
**Bug ID:** BUG-108
**Category:** Cryptographic
**Subcategory:** Insecure Random Number Generation
**Severity:** Medium
**CWE:** CWE-338
**CVSS Score:** 5.0
**File:**
ext/standard/php_lcg.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*