CVE-2017-5340

Source
https://nvd.nist.gov/vuln/detail/CVE-2017-5340
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2017-5340.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2017-5340
Downstream
Related
Published
2017-01-11T06:59:00Z
Modified
2025-10-10T01:09:20.910888Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
[none]
Details

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.

References

Affected packages

Git / github.com/php/php-src

Affected ranges

Type
GIT
Repo
https://github.com/php/php-src
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

Other

NEWS
NEWS-cvs2svn
POST_64BIT_BRANCH_MERGE
POST_AST_MERGE
POST_NATIVE_TLS_MERGE
POST_PHP7_EREG_MYSQL_REMOVALS
POST_PHP7_NSAPI_REMOVAL
POST_PHP7_REMOVALS
POST_PHPNG_MERGE
PRE_64BIT_BRANCH_MERGE
PRE_AST_MERGE
PRE_NATIVE_TLS_MERGE
PRE_PHP7_EREG_MYSQL_REMOVALS
PRE_PHP7_NSAPI_REMOVAL
PRE_PHP7_REMOVALS
PRE_PHPNG_MERGE

php-5.*

php-5.3.23RC1
php-5.3.29
php-5.3.29RC1
php-5.4.30RC1
php-5.4.32RC1
php-5.4.4RC2
php-5.5.24RC1
php-5.6.18RC1
php-5.6.19RC1
php-5.6.22RC1
php-5.6.23RC1
php-5.6.24RC1

php-7.*

php-7.0.11RC1
php-7.0.12RC1
php-7.0.13RC1
php-7.0.3RC1
php-7.0.4RC1
php-7.0.5RC1
php-7.0.7RC1
php-7.0.8RC1
php-7.0.9RC1

Database specific

{
    "vanir_signatures": [
        {
            "id": "CVE-2017-5340-7501d6a6",
            "digest": {
                "line_hashes": [
                    "302809697189148475297750884608790259821",
                    "25269136893474997921766866731112141155",
                    "176995661728580401951558063694425109185",
                    "282407999817348256037465684465485374719",
                    "27203332826222208118957196914128024108",
                    "327578526711602898995701292075519451415",
                    "101648155586618325587449013706940504782",
                    "84422741966942976358390282422869288177"
                ],
                "threshold": 0.9
            },
            "source": "https://github.com/php/php-src/commit/4cc0286f2f3780abc6084bcdae5dce595daa3c12",
            "target": {
                "file": "Zend/zend_hash.c"
            },
            "signature_version": "v1",
            "deprecated": false,
            "signature_type": "Line"
        },
        {
            "id": "CVE-2017-5340-7570f682",
            "digest": {
                "length": 534.0,
                "function_hash": "108479502598115741326499771321871644248"
            },
            "source": "https://github.com/php/php-src/commit/4cc0286f2f3780abc6084bcdae5dce595daa3c12",
            "target": {
                "function": "_zend_hash_init",
                "file": "Zend/zend_hash.c"
            },
            "signature_version": "v1",
            "deprecated": false,
            "signature_type": "Function"
        }
    ]
}