REDHAT-BUG-2496971: Medium severity OpenSSL OpenSSL extension for PHP vulnerability
In PHP versions 8.2. before 8.2.32, 8.3. before 8.3.32, 8.4. before 8.4.23, 8.5. before 8.5.8, the AES-WRAP-PAD algorithm implementation in OpenSSL extension contains a buffer allocation flaw. The output buffer for the AES key-wrap-with-padding operation is sized from the plaintext length without accounting for RFC 5649 expansion. This may cause OpenSSL to write beyond allocated memory, corrupting heap metadata and triggering application abort.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 8.2.32 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 8.3.32 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 8.4.23 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 8.5.8
Event History
Frequently Asked Questions
Which PHP deployments are affected?
Deployments using PHP 8.2 before 8.2.32, 8.3 before 8.3.32, 8.4 before 8.4.23, or 8.5 before 8.5.8 are affected when they use the OpenSSL extension's AES-WRAP-PAD operation.
What must occur for the flaw to be triggered?
An AES key-wrap-with-padding operation using AES-WRAP-PAD must process plaintext whose RFC 5649 output expansion exceeds the buffer allocation derived from the plaintext length. The resulting OpenSSL write can corrupt heap metadata and abort the application.
How can I check whether an application is exposed?
Verify the running PHP version and review whether the application invokes the OpenSSL extension's AES-WRAP-PAD algorithm. Versions at or above 8.2.32, 8.3.32, 8.4.23, or 8.5.8 for their respective release branches are not listed as affected.