# GHSA-8xhv-gqm4-3w99: ZendFramework1 Potential Insufficient Entropy Vulnerability

- Severity: High 7.5 (CVSS:3.1, scored by GitHub) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2024-06-07T22:26:25.000Z
- Modified: 2024-12-04T05:41:20.457Z
- Weaknesses: CWE-331

## Description

We discovered several methods used to generate random numbers in ZF1 that potentially used insufficient entropy. These random number generators are used in the following method calls:
```
Zend_Ldap_Attribute::createPassword
Zend_Form_Element_Hash::_generateHash
Zend_Gdata_HttpClient::filterHttpRequest
Zend_Filter_Encrypt_Mcrypt::_srand
Zend_OpenId::randomBytes
```
In each case, the methods were using rand() or mt_rand(), neither of which can generate cryptographically secure values. This could potentially lead to information disclosure should an attacker be able to brute force the random number generation.

Moreover, we discovered a potential security issue in the usage of the [openssl_random_pseudo_bytes()](http://php.net/manual/en/function.openssl-random-pseudo-bytes.php) function in Zend_Crypt_Math::randBytes, reported in PHP BUG [#70014](https://bugs.php.net/bug.php?id=70014), and the security implications reported in a discussion [on the random_compat library.](https://github.com/paragonie/random_compat/issues/96)

(As written by GitHub Advisory Database.)

## Affected

- zendframework/zendframework1 (Packagist): from 1.12.0 before 1.12.18

## References

- <https://framework.zend.com/security/advisory/ZF2016-01> (web)
- <https://github.com/FriendsOfPHP/security-advisories/blob/master/zendframework/zendframework1/ZF2016-01.yaml> (web)
- <https://github.com/zendframework/zf1> (package)

## Sources

- GitHub Advisory Database: [GHSA-8xhv-gqm4-3w99](https://github.com/advisories/GHSA-8xhv-gqm4-3w99), CC-BY-4.0, modified 2024-12-04

---

Page: https://cve.day/GHSA-8xhv-gqm4-3w99 · Whole record: https://cve.day/GHSA-8xhv-gqm4-3w99.json · Rebuilt by cve.day 2026-11-25T22:56:31.668Z
