Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: GSA_kwCzR0hTQS14Zzl3LXI0NjktbTQ1Nc4AA8zg
ZendFramework Potential Information Disclosure and Insufficient Entropy vulnerabilities
In Zend Framework 2, the Zend\Math\Rand
component generates random bytes using the OpenSSL or Mcrypt extensions when available but will otherwise use PHP's mt_rand()
function as a fallback. All outputs from mt_rand()
are predictable for the same PHP process if an attacker can brute force the seed used by the Marsenne-Twister algorithm in a Seed Recovery Attack. This attack can be successfully applied with minimum effort if the attacker has access to either a random number from mt_rand()
or a Session ID generated without using additional entropy. This makes mt_rand()
unsuitable for generating non-trivial random bytes since it has Insufficient Entropy to protect against brute force attacks on the seed.
The Zend\Validate\Csrf
component generates CSRF tokens by SHA1 hashing a salt, random number possibly generated using mt_rand()
and a form name. Where the salt is known, an attacker can brute force the SHA1 hash with minimum effort to discover the random number when mt_rand()
is utilised as a fallback to the OpenSSL and Mcrypt extensions. This constitutes an Information Disclosure where the recovered random number may itself be brute forced to recover the seed value and predict the output of other mt_rand()
calls for the same PHP process. This may potentially lead to vulnerabilities in areas of an application where mt_rand()
calls exist beyond the scope of Zend Framework.
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS14Zzl3LXI0NjktbTQ1Nc4AA8zg
Source: GitHub Advisory Database
Origin: Unspecified
Severity: High
Classification: General
Published: 6 months ago
Updated: 6 months ago
CVSS Score: 7.4
CVSS vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
Identifiers: GHSA-xg9w-r469-m455
References:
- https://github.com/zendframework/zendframework/commit/6975695dfdb201bda0aea02bcc11b4a85ddc89fa
- https://github.com/zendframework/zendframework/commit/97b98e7208f93613ab358432e56b6e2245153807
- https://framework.zend.com/security/advisory/ZF2013-02
- https://github.com/FriendsOfPHP/security-advisories/blob/master/zendframework/zendframework/ZF2013-02.yaml
- https://github.com/advisories/GHSA-xg9w-r469-m455
Blast Radius: 28.9
Affected Packages
packagist:zendframework/zendframework
Dependent packages: 959Dependent repositories: 7,968
Downloads: 7,467,939 total
Affected Version Ranges: >= 2.1.0, < 2.1.4, >= 2.0.0, < 2.0.8
Fixed in: 2.1.4, 2.0.8
All affected versions: 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.1.0, 2.1.1, 2.1.2, 2.1.3
All unaffected versions: 2.0.8, 2.1.4, 2.1.5, 2.1.6, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4, 2.2.5, 2.2.6, 2.2.7, 2.2.8, 2.2.9, 2.2.10, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.3.5, 2.3.6, 2.3.7, 2.3.8, 2.3.9, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.4.7, 2.4.8, 2.4.9, 2.4.10, 2.4.11, 2.4.12, 2.4.13, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 3.0.0