Am I affected?
CVE-2017-5340
Zend/zend_hash.c in PHP before 7.0.15 and 7.1.x before 7.1.1 mishandles certain cases that require large array allocations, which allows remote attackers to execute arbitrary code or cause a denial of service (integer overflow, uninitialized memory access, and use of arbitrary destructor function pointers) via crafted serialized data.
Not in the CISA KEV catalog as of the last sync. That means no confirmed exploitation is listed there, not that it is safe.
Exploit probability (FIRST EPSS): 16.7% chance of exploitation activity in the next 30 days (top 3% of all scored CVEs), scored 2026-11-23. EPSS is a likelihood estimate, not proof of attacks.
Check your PHP version
Fixed versions by branch
| Branch | Affected (NVD) | Fixed in |
|---|---|---|
| PHP 7.1 | 7.1.0 (including) to 7.1.1 (excluding) | 7.1.1 |
| PHP 7.0 | 7.0.0 (including) to 7.0.15 (excluding) | 7.0.15 |
"Fixed in" is shown only when the source gives an exact upper bound. Any later patch in the same branch also has the fix. Linux distributions (Ubuntu, Debian, RHEL) often backport fixes without changing the PHP version number.
Related CVEs
Other PHP CVEs that NVD lists for the same branches.
- CVE-2017-12932 Critical 9.8 · PHP 7.1, 7.0 · 2017-08-18
- CVE-2017-12933 Critical 9.8 · PHP 7.1, 7.0 · 2017-08-18
- CVE-2017-11362 Critical 9.8 · PHP 7.1, 7.0 · 2017-07-17
- CVE-2017-9224 Critical 9.8 · PHP 7.1, 7.0 · 2017-05-24
- CVE-2017-9226 Critical 9.8 · PHP 7.1, 7.0 · 2017-05-24
- CVE-2017-9227 Critical 9.8 · PHP 7.1, 7.0 · 2017-05-24
Questions
- Which PHP versions are affected by CVE-2017-5340?
- NVD lists these affected ranges: 7.1.0 (including) to 7.1.1 (excluding); 7.0.0 (including) to 7.0.15 (excluding).
- Which PHP version fixes CVE-2017-5340?
- According to NVD, the fix is in PHP 7.1.1, 7.0.15 (upgrade to that release or any later patch in the same branch).
- Does a version check prove my server is safe from CVE-2017-5340?
- No. The SAPI, web server, operating system, loaded extensions and configuration change whether a bug can be reached, and Linux distributions often backport fixes without changing the upstream version number.
Sources: CVE-2017-5340 on NIST NVD. NVD data synced 2026-11-24T03:47:46.548Z. See all PHP CVEs in the CVE explorer.