Vulnerability DatabaseGHSA-xg9w-r469-m455

GHSA-xg9w-r469-m455
PHP vulnerability analysis and mitigation

Overview

The vulnerability (GHSA-xg9w-r469-m455) affects Zend Framework 2's Zend\Math\Rand and Zend\Validate\Csrf components. The issue was discovered and disclosed on March 13, 2013, affecting versions 2.0.0 to 2.0.8 and 2.1.0 to 2.1.4. The vulnerability stems from the use of PHP's mt_rand() function as a fallback mechanism when OpenSSL or Mcrypt extensions are unavailable (Zend Advisory).

Technical details

The vulnerability exists in two components: Zend\Math\Rand generates random bytes using OpenSSL or Mcrypt extensions when available, but falls back to PHP's mt_rand() function when these extensions are not present. The Zend\Validate\Csrf component generates CSRF tokens by SHA1 hashing a combination of salt, random number (potentially generated using mt_rand()), and form name. The core issue is that all outputs from mt_rand() are predictable within the same PHP process if an attacker can brute force the seed used by the Marsenne-Twister algorithm in a Seed Recovery Attack (Zend Advisory).

Impact

The vulnerability can lead to Information Disclosure where an attacker can brute force the SHA1 hash with minimum effort to discover the random number when mt_rand() is utilized. Once the random number is recovered, it can be used to determine the seed value and predict the output of other mt_rand() calls for the same PHP process. This could potentially lead to vulnerabilities in areas of an application where mt_rand() calls exist beyond the scope of Zend Framework (Zend Advisory).

Exploitability

The vulnerability is exploitable with minimum effort if an attacker has access to either a random number from mt_rand() or a Session ID generated without using additional entropy. The attack can be successfully applied through a Seed Recovery Attack against the Marsenne-Twister algorithm (Zend Advisory).

Mitigation and workarounds

Zend Framework revised the Zend\Math\Rand component by replacing the mt_rand() fallback with Anthony Ferrara's RandomLib, which incorporates an additional entropy source based on George Argyros's published source code. The new fallback collects entropy from numerous sources beyond PHP's internal seed mechanism. Users are recommended to upgrade immediately to version 2.0.8 or 2.1.4, particularly if using either Zend\Math\Rand or Zend\Validate\Csrf without OpenSSL or Mcrypt extensions installed (Zend Advisory).

Additional resources


SourceThis report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-59989CRITICAL9.2
  • PHP logoPHP
  • phalcon/cphalcon
NoYesAug 21, 2026
CVE-2026-63135HIGH8.2
  • PHP logoPHP
  • yourls/yourls
NoYesAug 21, 2026
GHSA-p2ch-c2c3-4xm5MEDIUM6.1
  • PHP logoPHP
  • winter/wn-backend-module
NoYesAug 20, 2026
GHSA-8hgv-xc77-jmcrMEDIUM5.1
  • PHP logoPHP
  • getgrav/grav
NoYesAug 21, 2026
GHSA-hq84-x37p-j6q5MEDIUM4.5
  • PHP logoPHP
  • winter/wn-backend-module
NoYesAug 20, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management