Skip to main content
Public proof of conceptFix available

CVE-2024-2408

A public proof of concept exists; no exploitation attested.

  • Published2024-06-09
  • Fixed in8.3.8 · 8.2.20 · 8.1.29
  • WeaknessCWE-203

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2024-06-0920:15CVE publishedNVD

Versions per branch

NVD · CISA-ADP · OSV
PHP
BranchAffectedFixed in
8.3≥ 8.3.0, < 8.3.88.3.8
8.2≥ 8.2.0, < 8.2.208.2.20
8.1≥ 8.1.0, < 8.1.298.1.29
8.1< 8.1.298.1.29
Fedoraproject fedora
BranchAffectedFixed in
40.x= 40no fix published

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As php, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • PHP Group PHPother versions: affected

    https://github.com/php/php-src

    Affected
    • ≥ 8.1.*, < 8.1.29fixed in 8.1.29semver
    • ≥ 8.2.*, < 8.2.20fixed in 8.2.20semver
    • ≥ 8.3.*, < 8.3.8fixed in 8.3.8semver

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE Terms of UseCVE recordupdated 2024-06-13

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • opensslTuxCare:CentOS:8.5all versions · fixed in 1:1.1.1k-5.el8.5.tuxcare.els12and 4 other packages
  • opensslTuxCare:CentOS:8.4all versions · fixed in 1:1.1.1g-15.el8.4.tuxcare.els13and 4 other packages
  • opensslRocky Linux:8all versions · fixed in 1:1.1.1k-12.el8_9
  • opensslRed Hat:enterprise_linux:8::baseosall versions · fixed in 1:1.1.1k-12.el8_9and 6 other packages
  • opensslAlmaLinux:8all versions · fixed in 1:1.1.1k-12.el8_9and 3 other packages
  • phpAzure Linux:3all versions · fixed in 8.3.8-1
  • phpAzure Linux:2all versions · fixed in 8.1.29-1
  • php-8.1Wolfiall versions · fixed in 8.1.29-r0

5 more package ranges on OSV.dev

Vendor advisories

  • CVE-2024-2408 Red Hat Product Security34 products fixed · 226 known affected

    php: potential exposure to Marvin attack via unsafe implementation of RSA decryption API

    php as a component of Red Hat Enterprise Linux 6 · php-bcmath as a component of Red Hat Enterprise Linux 6 · php-cli as a component of Red Hat Enterprise Linux 6 · +223 more

  • RHSA-2023:7877 Red Hat Product Security34 products fixed

    Red Hat Security Advisory: openssl security update

Full record on NVD

Fix

  1. Update PHP to 8.3.8 · 8.2.20 · 8.1.29
  2. Vendor fix Red Hat Product Security CVE-2024-2408 · 34 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258 For the update to take effect, all services linked to the OpenSSL library must be restarted, or the system rebooted.
  3. Workaround from the vendor Red Hat Product Security CVE-2024-2408 · 260 productsMitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
  4. No fix available, says the vendor Red Hat Product Security CVE-2024-2408 · 47 productsAffected
  5. No fix planned, says the vendor Red Hat Product Security CVE-2024-2408 · 54 productsOut of support scope
  6. No fix planned, says the vendor Red Hat Product Security CVE-2024-2408 · 125 productsWill not fix

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

Identifiers

Technical details

CVSS v3 Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Published
2024-06-09
Last Modified
2026-06-17
NVD status
Modified
GitHub Advisory
GHSA-hh26-4ppw-5864

Frequently asked questions

What is CVE-2024-2408?

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.

Is CVE-2024-2408 actively exploited?

A proof-of-concept exploit exists for CVE-2024-2408, but active exploitation has not been confirmed at this time.

What is the CVSS score for CVE-2024-2408?

CVE-2024-2408 has a CVSS v3 base score of 5.9 (MEDIUM severity), with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N.

Running PHP? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month

Sources for this record