CVE-2024-2408
PHP is vulnerable to the Marvin Attack
Reported by php · Published June 9, 2024
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| php8.2-xml | Amazon Linux | 8.2.21-1.amzn2023.0.1 |
| php8.1-pdo | Amazon Linux | 8.1.29-1.amzn2023.0.1 |
| php8.1-intl | Amazon Linux | 8.1.29-1.amzn2023.0.1 |
| php8.2-pgsql | Amazon Linux | 8.2.21-1.amzn2023.0.1 |
| php-8.2 | Chainguard | 8.2.20-r0 |
| php8.1-process | Amazon Linux | 8.1.29-1.amzn2023.0.1 |
| php8.2-bcmath | Amazon Linux | 8.2.21-1.amzn2023.0.1 |
| php8.2-cli | Amazon Linux | 8.2.21-1.amzn2023.0.1 |
| php8.1-bcmath | Amazon Linux | 8.1.29-1.amzn2023.0.1 |
| php8.2-dba | Amazon Linux | 8.2.21-1.amzn2023.0.1 |
| php8.1-pspell | Amazon Linux | 8.1.29-1.amzn2023.0.1 |
| php8.1-pgsql | Amazon Linux | 8.1.29-1.amzn2023.0.1 |
28 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| PHP Group | PHP | 8.1.*, 8.2.*, 8.3.* |
| amazon:2023 | php8.2-xml | 0 |
| amazon:2023 | php8.1-pdo | 0 |
| amazon:2023 | php8.1-intl | 0 |
| amazon:2023 | php8.2-pgsql | 0 |
| chainguard | php-8.2 | 0 |
| amazon:2023 | php8.1-process | 0 |
| amazon:2023 | php8.2-bcmath | 0 |
| amazon:2023 | php8.2-cli | 0 |
| amazon:2023 | php8.1-bcmath | 0 |
| amazon:2023 | php8.2-dba | 0 |
| amazon:2023 | php8.1-pspell | 0 |
| amazon:2023 | php8.1-pgsql | 0 |
| amazon:2023 | php8.2-pdo | 0 |
| amazon:2023 | php8.1-xml | 0 |
| amazon:2023 | php8.1-mysqlnd | 0 |
| amazon:2023 | php8.2-soap | 0 |
| amazon:2023 | php8.2-process | 0 |
| amazon:2023 | php8.2-sodium | 0 |
| amazon:2023 | php8.1-tidy | 0 |
…and 45 more
Timeline
- Jun 9, 2024 CVE Published
- Jun 10, 2024 EPSS Score (30 in total, the first dated here)
- Oct 4, 2024 Coalition ESS Score (17 in total, the first dated here)
- Mar 14, 2025 PoC Published
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-2408
vulnetix vdb fixes CVE-2024-2408
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-2408/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart