CVE-2017-5340: Integer Overflow

Published Jan 11, 2017
·
Updated

Fixed bug (Use of uninitialized memory in unserialize()). (CVE-2017-5340)

Other sources

It was found that PHP uses uninitialized memory during calls to unserialize(). The payload supplied to unserialize() may control this uninitialized memory region and thus may be used to trick PHP into operating on faked objects and calling attacker controlled destructor function pointers, effectively allowing arbitrary code execution.

Upstream bug:

https://bugs.php.net/bug.php?id=73832

Red Hat

Zend/zendhash.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.

MITRE

Affected Software

6 affected componentsFixes available
redhat/php<7.0.15
7.0.15
redhat/php<7.1.1
7.1.1
PHP PHP>=7.0.0<7.0.15
PHP PHP>=7.1.0<7.1.1
NetApp Clustered Data ONTAP
PHP PHP<7.0.15
7.0.15

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/php to a version that resolves this vulnerability.

    Fixed in 7.0.15
  2. Upgrade

    Upgrade redhat/php to a version that resolves this vulnerability.

    Fixed in 7.1.1
  3. Upgrade

    Upgrade PHP to a version that resolves this vulnerability.

    Fixed in 7.0.15
  4. Upgrade

    Upgrade php to a version that resolves this vulnerability.

    Fixed in 7.0.15
  5. Upgrade

    Upgrade php to a version that resolves this vulnerability.

    Fixed in 7.1.1

Event History

Jan 11, 2017
CVE Published
via MITRE·06:02 AM
Data Sourced
via MITRE·06:02 AM
Description
Data Sourced
via NVD·06:59 AM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2017-5340?

CVE-2017-5340 has a high severity rating due to its potential to allow remote code execution and denial of service.

2

How do I fix CVE-2017-5340?

To fix CVE-2017-5340, upgrade PHP to version 7.0.15 or 7.1.1, depending on your current version.

3

What versions of PHP are affected by CVE-2017-5340?

CVE-2017-5340 affects PHP versions prior to 7.0.15 and 7.1.x before 7.1.1.

4

What issues does CVE-2017-5340 lead to?

CVE-2017-5340 can lead to integer overflow, uninitialized memory access, and potential execution of arbitrary code.

5

Is it safe to use PHP versions below the patched versions for CVE-2017-5340?

Using PHP versions below 7.0.15 or 7.1.1 is not safe due to the vulnerabilities present in those versions.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203