ZendFramework Potential Information Disclosure and Insufficient Entropy vulnerabilities in zendframework/zendframework

zendframework/zendframework Updated 02 Oct 2025

Summary

07/06/2024
HIGH
Yes i
High
7.4

GHSA-xg9w-r469-m455: ZendFramework Potential Information Disclosure and Insufficient Entropy vulnerabilities. Affects zendframework/zendframework across 2 version ranges.

>= 2.0.0, < 2.0.8 >= 2.1.0, < 2.1.4

Fixed in 2.0.8 or 2.1.4, depending on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

ZendFramework is a popular open-source PHP framework that provides a collection of professional PHP packages. It offers a wide range of functionalities for developing web applications, including components for generating random numbers and validating CSRF tokens. However, versions 2.0.0 to 2.0.8 and 2.1.0 to 2.1.4 of zendframework/zendframework are vulnerable to potential information disclosure and insufficient entropy issues.

Vulnerability Detail

The vulnerability in ZendFramework arises from the use of PHP's mt_rand() function as a fallback for generating random bytes when the OpenSSL or Mcrypt extensions are not available. The outputs of mt_rand() are predictable for the same PHP process, making it susceptible to a Seed Recovery Attack. An attacker with access to a random number from mt_rand() or a session ID generated without additional entropy can easily brute force the seed used by the Marsenne-Twister algorithm in mt_rand(). This attack can lead to the disclosure of sensitive information and the ability to predict the output of other mt_rand() calls within the same PHP process.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 2.0.0, < 2.0.8 2.0.8
    composer require zendframework/zendframework:2.0.8
  • >= 2.1.0, < 2.1.4 2.1.4
    composer require zendframework/zendframework:2.1.4

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

If upgrading to the fixed versions is not immediately possible, a workaround is to use a different random number generation method that provides sufficient entropy. One option is to use the random_bytes() function introduced in PHP 7, which utilizes the operating system's random number generator. Here is an example of how to generate random bytes using random_bytes():

$randomBytes = random_bytes($length);

Conclusion

In conclusion, versions 2.0.0 to 2.0.8 and 2.1.0 to 2.1.4 of zendframework/zendframework are vulnerable to potential information disclosure and insufficient entropy issues. It is crucial to upgrade to fixed versions or apply the recommended workaround to mitigate the risk of unauthorized access and other malicious activities.

See every vulnerability recorded for zendframework/zendframework →

Share this vulnerability

FAQ

The vulnerability can lead to the disclosure of sensitive information and the ability to predict the output of other mt_rand() calls within the same PHP process. This can potentially be exploited to gain unauthorized access or perform other malicious activities.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities without requiring access to the code or installation.

No, only versions 2.0.0 to 2.0.8 and 2.1.0 to 2.1.4 of zendframework/zendframework are affected. It is recommended to upgrade to versions 2.0.9 or higher for the 2.0.x branch, and versions 2.1.5 or higher for the 2.1.x branch.

Yes, if upgrading to the fixed versions is not immediately possible, you can use a different random number generation method that provides sufficient entropy. One option is to use the random_bytes() function introduced in PHP 7.

Yes, the CVSS score for this vulnerability is 7.4, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for zendframework/zendframework.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 2.0.0, < 2.0.8 2.0.8
    composer require zendframework/zendframework:2.0.8
  • >= 2.1.0, < 2.1.4 2.1.4
    composer require zendframework/zendframework:2.1.4

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback