CVE-2018-12882: Use After Free

Published Jun 26, 2018
·
Updated

exifreadfromimpl in ext/exif/exif.c in PHP 7.2.x through 7.2.7 allows attackers to trigger a use-after-free (in exifreadfromfile) because it closes a stream that it is not responsible for closing. The vulnerable code is reachable through the PHP exifreaddata function.

Other sources

Fixed bug (heap use after free in phpstreamfree). (CVE-2018-12882)

PHP

Affected Software

7 affected componentsFixes available
debian/php5
debian/php7.0
debian/php7.1
PHP PHP>=7.2.0<=7.2.7
Canonical Ubuntu Linux=18.04
Netapp Storage Automation Store
PHP PHP<7.2.8
7.2.8

Remediation

Event History

Jun 26, 2018
CVE Published
via MITRE·03:00 AM
Data Sourced
via MITRE·03:00 AM
Description
Data Sourced
via NVD·03:29 AM
RemedyDescriptionSeverityWeaknessAffected Software
Jan 11, 2024
Data Sourced
via Launchpad·10:50 PM
Description
Feb 20, 2026
Data Sourced
via Ubuntu·04:36 PM
RemedyDescriptionSeverityAffected 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-2018-12882?

CVE-2018-12882 has been identified as a medium severity vulnerability due to the potential for a use-after-free condition that may lead to arbitrary code execution.

2

How do I fix CVE-2018-12882?

To fix CVE-2018-12882, upgrade to PHP version 7.2.8 or later.

3

What versions of PHP are affected by CVE-2018-12882?

CVE-2018-12882 affects PHP versions 7.2.0 through 7.2.7.

4

What is the nature of the vulnerability described in CVE-2018-12882?

CVE-2018-12882 is a use-after-free vulnerability in the exif_read_from_impl function within PHP's EXIF processing.

5

Is CVE-2018-12882 present in other PHP versions aside from 7.2?

CVE-2018-12882 specifically affects PHP version 7.2.x and does not affect older versions like PHP 5.x or PHP 7.0 and 7.1.

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