In Zend Framework, Zend_Captcha_Word (v1) and Zend\Captcha\Word (v2)
generate a "word" for a CAPTCHA challenge by selecting a sequence of random
letters from a character set. Prior to this advisory, the selection was
performed using PHP's internal array_rand() function. This function does not
generate sufficient entropy due to its usage of rand() instead of more
cryptographically secure methods such as openssl_pseudo_random_bytes(). This
could potentially lead to information disclosure should an attacker be able to
brute force the random number generation.
The code used to randomly select letters was updated as follows:
randBytes() and randInteger() were
added to Zend_Crypt_Math. Zend_Captcha_AbstractWord was updated to use
Zend_Crypt_Math::randInteger() instead of array_rand() when selecting
letters for the CAPTCHA word.Zend\Captcha\AbstractWord was updated to use
Zend\Math\Rand::getInteger() instead of array_rand() when selecting
letters for the CAPTCHA word.The following releases contain the fixes:
This patch is considered a security hardening patch, and as such, was not assigned a CVE identifier.
Regardless, if you use one of the word-based CAPTCHA adapters in Zend Framework 1 or 2, we recommend upgrading to 1.12.17, 2.4.9, or zend-captcha 2.4.9/2.5.2.
The Zend Framework team thanks the following for identifying the issues and working with us to help protect its users:
Released 2015-11-23
Have you identified a security vulnerability?
Please report it to us at zf-security@zend.com