Description
The openssl_private_decrypt function in PHP, when using PKCS1 padding (OPENSSL_PKCS1_PADDING, which is the default), is vulnerable to the Marvin Attack unless it is used with an OpenSSL version that includes the changes from this pull request: https://github.com/openssl/openssl/pull/13817 (rsa_pkcs1_implicit_rejection). These changes are part of OpenSSL 3.2 and have also been backported to stable versions of various Linux distributions, as well as to the PHP builds provided for Windows since the previous release. All distributors and builders should ensure that this version is used to prevent PHP from being vulnerable.
PHP Windows builds for the versions 8.1.29, 8.2.20 and 8.3.8 and above include OpenSSL patches that fix the vulnerability.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| PHP Group | PHP | 8.1.* – < 8.1.29, 8.2.* – < 8.2.20, 8.3.* – < 8.3.8 | 8.1.29 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 12 | php8.2 | 8.2.18-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 14.04 LTS | php5 | No fix yet | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 8 | openssl +3 | 1:1.1.1k-12.el8_9 | RHSA-2023:7877 |
AlmaLinux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux 8 | openssl +3 | 1:1.1.1k-12.el8_9 | ALSA-2023:7877 |
Rocky Linux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Rocky Linux 8 | openssl | 1:1.1.1k-12.el8_9 | RLSA-2023:7877 |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | php8.1 +26 | 8.1.29-1.amzn2023.0.1 | ALAS2023-2024-654 |
| Amazon Linux 2023 | php8.2 +27 | 8.2.21-1.amzn2023.0.1 | ALAS2023-2024-678 |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | php | 8.3.8-1 | — |
| Azure Linux 2 (CBL-Mariner) | php | 8.1.29-1 | — |
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | php-8.1 | 8.1.29-r0 | — |
| Wolfi rolling | php-8.2 | 8.2.20-r0 | — |
Advisories 7
- ALSA-2023:7877 Low: openssl security update AlmaLinux Security Advisories · Oct 29, 2026
- RHSA-2023:7877 Red Hat Security Advisory: openssl security update Red Hat Security Advisories (RHSA) · Oct 15, 2026
- RLSA-2023:7877 Low: openssl security update Rocky Linux Security Advisories · Dec 3, 2025
- WID-SEC-2024-1324 PHP: Schwachstelle ermöglicht Offenlegung von Informationen BSI CERT-Bund (WID) · Jan 30, 2025
- NCSC-2024-0411 Kwetsbaarheden verholpen in Oracle Database producten NCSC-NL (Netherlands) · Oct 17, 2024
- ALAS2023-2024-678 Moderate: php8.2 security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Aug 6, 2024
- ALAS2023-2024-654 Moderate: php8.1 security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Jul 22, 2024
References
- https://github.com/php/php-src/security/advisories/GHSA-hh26-4ppw-5864
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/