Skip to content

GHSA-8xhv-gqm4-3w99

ZendFramework1 Potential Insufficient Entropy Vulnerability

High Packagist
Severity
7.5 / 10
High · CVSS 3.1
Exploit chance (EPSS)
—
No score published
Known exploited
No
Not in CISA's catalog
Weakness
CWE-331 Insufficient Entropy
Fix
1.12.18
Upgrade zendframework/zendframework1 to this version or later

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() function in Zend_Crypt_Math::randBytes, reported in PHP BUG #70014, and the security implications reported in a discussion on the random_compat library.

Affected versions

Packagist

PackageVulnerableFixed in
zendframework/zendframework1
>= 1.12.0, < 1.12.18
1.12.18

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

zendframework/zendframework1 Packagist → 1.12.18

composer
composer require zendframework/zendframework1:^1.12.18

Severity breakdown

CVSS 3.1 7.5

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Weakness

CWE-331: Insufficient Entropy

The product uses an algorithm or scheme that produces insufficient entropy, leaving patterns or clusters of values that are more likely to occur than others.

How to prevent it
  • Implementation: Determine the necessary entropy to adequately provide for randomness and predictability. This can be achieved by increasing the number of bits of objects such as keys and seeds.

References

Timeline

  1. Published
  2. Last updated by the source
AdvisorySeverityWhy it's related
GHSA-6fqw-j3vm-7f66
Zendframework1 Potential SQL injection in ORDER and GROUP functions
Critical Also affects zendframework/zendframework1
GHSA-848f-mph5-9pm9
Zendframework Potential Information Disclosure and Insufficient Entropy vulnerability
High Also affects zendframework/zendframework1
GHSA-v42g-7q2x-cw32
Zendframework1 potential SQL injection vector using null byte for PDO (MsSql, SQLite)
Critical Also affects zendframework/zendframework1
GHSA-2x36-qhx3-7m5f
ZendFramework1 Potential SQL injection in the ORDER implementation of Zend_Db_Select
Critical Also affects zendframework/zendframework1
GHSA-9v78-h226-2rmq
Zendframework potential security issue in login mechanism
High Also affects zendframework/zendframework1
GHSA-4vf6-mq7w-3hp6
Zend_Filter_StripTags vulnerable to Cross-site Scripting when comments allowed
Medium Also affects zendframework/zendframework1
GHSA-4v57-pwvf-x35j
Zendframework potential Cross-site Scripting vector in `Zend_Service_ReCaptcha_MailHide`
Medium Also affects zendframework/zendframework1
GHSA-vvm3-rv48-j3g5
Zendframework Potential XSS or HTML Injection vector in Zend_Json
Medium Also affects zendframework/zendframework1
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor