CVE-2018-12882
exif_read_from_impl in ext/exif/exif.c in PHP 7.2.x through 7.2.7 allows attackers to trigger a...
CVE-2018-12882 is a critical vulnerability (CVSS 9.8) in Php, published June 25, 2018. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 6.48%, the 93rd percentile. Fixed in php7 7.0.7-50.41.1.
exif_read_from_impl in ext/exif/exif.c in PHP 7.2.x through 7.2.7 allows attackers to trigger a use-after-free (in exif_read_from_file) because it closes a stream that it is not responsible for closing. The vulnerable code is reachable through the PHP exif_read_data function.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
9.8
exif_read_from_impl in ext/exif/exif.c in PHP 7.2.x through 7.2.7 allows attackers to trigger a use-after-free (in exif_read_from_file) because it closes a stream that it is not responsible for closing. The vulnerable code is reachable through the PHP exif_read_data function.
- Record
CVE-2018-12882- CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 2.0
- 7.5 High
AV:N/AC:L/Au:N/C:P/I:P/A:P - Weakness
- CWE-416
- Updated
- 2026-11-02
CVE List No score
exif_read_from_impl in ext/exif/exif.c in PHP 7.2.x through 7.2.7 allows attackers to trigger a use-after-free (in exif_read_from_file) because it closes a stream that it is not responsible for closing. The vulnerable code is reachable through the PHP exif_read_data function.
- Record
CVE-2018-12882- Updated
- 2026-11-02
EUVDEUVD-2018-4835 No score
exif_read_from_impl in ext/exif/exif.c in PHP 7.2.x through 7.2.7 allows attackers to trigger a use-after-free (in exif_read_from_file) because it closes a stream that it is not responsible for closing. The vulnerable code is reachable through the PHP exif_read_data function.
- Record
EUVD-2018-4835- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-p666-3cc6-g2c6
9.8
exif_read_from_impl in ext/exif/exif.c in PHP 7.2.x through 7.2.7 allows attackers to trigger a...
exif_read_from_impl in ext/exif/exif.c in PHP 7.2.x through 7.2.7 allows attackers to trigger a use-after-free (in exif_read_from_file) because it closes a stream that it is not responsible for closing. The vulnerable code is reachable through the PHP exif_read_data function.
- Record
GHSA-p666-3cc6-g2c6- CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-416
- Updated
- 2026-11-02
OSV
9.8
exif_read_from_impl in ext/exif/exif.c in PHP 7.2.x through 7.2.7 allows attackers to trigger a use-after-free (in exif_read_from_file) because it closes a stream that it is not responsible for closing. The vulnerable code is reachable through the PHP exif_read_data function.
- Record
CVE-2018-12882- CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2018-12882
9.8
exif_read_from_impl in ext/exif/exif.c in PHP 7.2.x through 7.2.7 allows attackers to trigger a use-after-free (in exif_read_from_file) because it closes a stream that it is not responsible for closing. The vulnerable code is reachable through the PHP exif_read_data function.
- Record
UBUNTU-CVE-2018-12882- CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
Show 10 moreShow less
OSVopenSUSE-SU-2024:11167-1 No score
php7-7.4.24-1.1 on GA media
These are all security issues fixed in the php7-7.4.24-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:11167-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:11169-1 No score
php8-8.0.11-1.1 on GA media
These are all security issues fixed in the php8-8.0.11-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:11169-1- Updated
- 2026-11-02
OSVSUSE-SU-2018:1886-1 No score
Security update for php7
This update for php7 fixes the following issues:
- CVE-2018-12882: exif_read_from_impl allowed attackers to trigger a use-after-free (in exif_read_from_file) because it closed a stream that it is not responsible for closing (bsc#1099098)
- Record
SUSE-SU-2018:1886-1- Updated
- 2026-11-02
OSVSUSE-SU-2018:1936-1 No score
Security update for php7
This update for php7 fixes the following issues:
- CVE-2018-12882: exif_read_from_impl allowed attackers to trigger a use-after-free (in exif_read_from_file) because it closed a stream that it is not responsible for closing (bsc#1099098).
- Record
SUSE-SU-2018:1936-1- Updated
- 2026-11-02
OSVSUSE-SU-2018:1936-2 No score
Security update for php7
This update for php7 fixes the following issues:
- CVE-2018-12882: exif_read_from_impl allowed attackers to trigger a use-after-free (in exif_read_from_file) because it closed a stream that it is not responsible for closing (bsc#1099098).
- Record
SUSE-SU-2018:1936-2- Updated
- 2026-11-02
OSVSUSE-SU-2018:2044-1 No score
Security update for php53
This update for php53 fixes the following issues:
The following security issue was fixed:
- An out-of-bounds read in the do_core_note function in readelf.c in libmagic.a allowed remote attackers to cause a denial of service via a crafted ELF file (CVE-2018-10360, bsc#1096984)
- CVE-2018-12882: exif_read_from_impl allowed attackers to trigger a use-after-free (in exif_read_from_file) because it closed a stream that it is not responsible for closing (bsc#1099098)
- Record
SUSE-SU-2018:2044-1- Updated
- 2026-11-02
OSVSUSE-SU-2018:2682-1 No score
Security update for php5
This update for php5 fixes the following issues:
The following security issues were fixed:
- CVE-2018-10360: Fixed an out-of-bounds read in the do_core_note function in readelf.c in libmagic.a, which allowed remote attackers to cause a denial of service via a crafted ELF file (bsc#1096984)
- CVE-2018-14851: Fixed an out-of-bound read in exif_process_IFD_in_MAKERNOTE, which could be exploited by an attacker via crafted JPG files, and could result in an application crash. (bsc#1103659)
- CVE-2018-12882: Fixed an use-after-free in exif_read_from_impl in ext/exif/exif.c (bsc#1099098)
- CVE-2017-9118: Fixed an out of bounds access in php_pcre_replace_impl via a crafted preg_replace call (bsc#1105466)
- Record
SUSE-SU-2018:2682-1- Updated
- 2026-11-02
OSVSUSE-SU-2022:4067-1 No score
Security update for php7
This update for php7 fixes the following issues:
-
Version update to 7.2.34 [jsc#SLE-23639]
-
CVE-2022-37454: Fixed SHA-3 buffer overflow (bsc#1204577).
-
Fix integer overflow in PHP_SHA3##bits (bsc#1204577#c26).
- Record
SUSE-SU-2022:4067-1- Updated
- 2026-11-02
OSVUSN-3702-1 No score
php7.2 vulnerability
It was discovered that PHP incorrectly handled exif tags in certain images. A remote attacker could use this issue to cause PHP to crash, resulting in a denial of service, or possibly execute arbitrary code.
- Record
USN-3702-1- Updated
- 2026-11-02
OSVUSN-3702-2 No score
php7.2 vulnerability
USN-3702-1 fixed a vulnerability in PHP. PHP 7.2.7 did not actually include the fix for CVE-2018-12882. This update adds a backported patch to correct the issue.
We apologize for the inconvenience.
Original advisory details:
It was discovered that PHP incorrectly handled exif tags in certain images. A remote attacker could use this issue to cause PHP to crash, resulting in a denial of service, or possibly execute arbitrary code.
- Record
USN-3702-2- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
php7SUSE:Linux Enterprise Module for Web and Scripting 12 |
before 7.0.7-50.41.1 | 7.0.7-50.41.1 |
php7SUSE:Linux Enterprise Software Development Kit 12 SP3 |
before 7.0.7-50.41.1 | 7.0.7-50.41.1 |
php7SUSE:Linux Enterprise Module for Web and Scripting 15 |
before 7.2.5-4.3.1 | 7.2.5-4.3.1 |
php53SUSE:Linux Enterprise Software Development Kit 11 SP4 |
before 5.3.17-112.28.1 | 5.3.17-112.28.1 |
php53SUSE:Linux Enterprise Server 11 SP4 |
before 5.3.17-112.28.1 | 5.3.17-112.28.1 |
php53SUSE:Linux Enterprise Server for SAP Applications 11 SP4 |
before 5.3.17-112.28.1 | 5.3.17-112.28.1 |
php5SUSE:Linux Enterprise Module for Web and Scripting 12 |
before 5.5.14-109.38.1 | 5.5.14-109.38.1 |
php5SUSE:Linux Enterprise Software Development Kit 12 SP3 |
before 5.5.14-109.38.1 | 5.5.14-109.38.1 |
php7SUSE:Linux Enterprise High Performance Computing 15-ESPOS |
before 7.2.34-150000.4.103.1 | 7.2.34-150000.4.103.1 |
php7SUSE:Linux Enterprise High Performance Computing 15-LTSS |
before 7.2.34-150000.4.103.1 | 7.2.34-150000.4.103.1 |
Show 13 moreShow less
| Package | Affected | Fixed |
|---|---|---|
php7SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS |
before 7.2.34-150000.4.103.1 | 7.2.34-150000.4.103.1 |
php7SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS |
before 7.2.34-150000.4.103.1 | 7.2.34-150000.4.103.1 |
php7SUSE:Linux Enterprise Server 15-LTSS |
before 7.2.34-150000.4.103.1 | 7.2.34-150000.4.103.1 |
php7SUSE:Linux Enterprise Server 15 SP1-BCL |
before 7.2.34-150000.4.103.1 | 7.2.34-150000.4.103.1 |
php7SUSE:Linux Enterprise Server 15 SP1-LTSS |
before 7.2.34-150000.4.103.1 | 7.2.34-150000.4.103.1 |
php7SUSE:Linux Enterprise Server for SAP Applications 15 |
before 7.2.34-150000.4.103.1 | 7.2.34-150000.4.103.1 |
php7SUSE:Linux Enterprise Server for SAP Applications 15 SP1 |
before 7.2.34-150000.4.103.1 | 7.2.34-150000.4.103.1 |
php7SUSE:Enterprise Storage 6 |
before 7.2.34-150000.4.103.1 | 7.2.34-150000.4.103.1 |
php7openSUSE:Leap 15.4 |
before 7.2.34-150000.4.103.1 | 7.2.34-150000.4.103.1 |
php7.2Ubuntu:18.04:LTS |
before 7.2.7-0ubuntu0.18.04.2, plus listed versions 7.2.1-1ubuntu27.2.2-1ubuntu17.2.2-1ubuntu27.2.3-1ubuntu17.2.5-0ubuntu0.18.04.17.2.7-0ubuntu0.18.04.1 |
7.2.7-0ubuntu0.18.04.2 |
php7.2Ubuntu:18.04:LTS |
before 7.2.7-0ubuntu0.18.04.1, plus listed versions 7.2.1-1ubuntu27.2.2-1ubuntu17.2.2-1ubuntu27.2.3-1ubuntu17.2.5-0ubuntu0.18.04.1 |
7.2.7-0ubuntu0.18.04.1 |
php7openSUSE:Tumbleweed |
before 7.4.24-1.1 | 7.4.24-1.1 |
php8openSUSE:Tumbleweed |
before 8.0.11-1.1 | 8.0.11-1.1 |
History
| When | Changed | Sources |
|---|---|---|
| 2026-11-03 | aliases | EUVD |
| 2026-11-02 | created | CVE List, GitHub Advisories, NVD, OSV |
References
securityfocus.com/bid/104551
usn.ubuntu.com/3702-2
bugs.php.net/bug.php?id=76409
usn.ubuntu.com/3702-1
security.netapp.com/advisory/ntap-20181109-0001
nvd.nist.gov/vuln/detail/CVE-2018-12882
Show 139 moreShow less
github.com/advisories/GHSA-p666-3cc6-g2c6
suse.com/support/update/announcement/2018/suse-su-20181886-1
bugzilla.suse.com/1099098
suse.com/security/cve/CVE-2018-12882
suse.com/support/update/announcement/2018/suse-su-20181936-1
suse.com/support/update/announcement/2018/suse-su-20181936-2
suse.com/support/update/announcement/2018/suse-su-20182044-1
bugzilla.suse.com/1096984
suse.com/security/cve/CVE-2018-10360
suse.com/support/update/announcement/2018/suse-su-20182682-1
bugzilla.suse.com/1103659
bugzilla.suse.com/1105466
suse.com/security/cve/CVE-2017-9118
suse.com/security/cve/CVE-2018-14851
suse.com/support/update/announcement/2022/suse-su-20224067-1
bugzilla.suse.com/1204577
suse.com/security/cve/CVE-2015-9253
suse.com/security/cve/CVE-2017-8923
suse.com/security/cve/CVE-2017-9120
suse.com/security/cve/CVE-2018-1000222
suse.com/security/cve/CVE-2018-17082
suse.com/security/cve/CVE-2018-19935
suse.com/security/cve/CVE-2018-20783
suse.com/security/cve/CVE-2019-11034
suse.com/security/cve/CVE-2019-11035
suse.com/security/cve/CVE-2019-11036
suse.com/security/cve/CVE-2019-11039
suse.com/security/cve/CVE-2019-11040
suse.com/security/cve/CVE-2019-11041
suse.com/security/cve/CVE-2019-11042
suse.com/security/cve/CVE-2019-11043
suse.com/security/cve/CVE-2019-11045
suse.com/security/cve/CVE-2019-11046
suse.com/security/cve/CVE-2019-11047
suse.com/security/cve/CVE-2019-11048
suse.com/security/cve/CVE-2019-11050
suse.com/security/cve/CVE-2019-9020
suse.com/security/cve/CVE-2019-9021
suse.com/security/cve/CVE-2019-9022
suse.com/security/cve/CVE-2019-9023
suse.com/security/cve/CVE-2019-9024
suse.com/security/cve/CVE-2019-9637
suse.com/security/cve/CVE-2019-9638
suse.com/security/cve/CVE-2019-9640
suse.com/security/cve/CVE-2019-9641
suse.com/security/cve/CVE-2019-9675
suse.com/security/cve/CVE-2020-7059
suse.com/security/cve/CVE-2020-7060
suse.com/security/cve/CVE-2020-7062
suse.com/security/cve/CVE-2020-7063
suse.com/security/cve/CVE-2020-7064
suse.com/security/cve/CVE-2020-7066
suse.com/security/cve/CVE-2020-7068
suse.com/security/cve/CVE-2020-7069
suse.com/security/cve/CVE-2020-7070
suse.com/security/cve/CVE-2020-7071
suse.com/security/cve/CVE-2021-21702
suse.com/security/cve/CVE-2021-21703
suse.com/security/cve/CVE-2021-21704
suse.com/security/cve/CVE-2021-21705
suse.com/security/cve/CVE-2021-21707
suse.com/security/cve/CVE-2022-31625
suse.com/security/cve/CVE-2022-31626
suse.com/security/cve/CVE-2022-31628
suse.com/security/cve/CVE-2022-31629
suse.com/security/cve/CVE-2022-37454
ubuntu.com/security/CVE-2018-12882
ubuntu.com/security/notices/USN-3702-1
ubuntu.com/security/notices/USN-3702-2
cve.org/CVERecord?id=CVE-2018-12882
suse.com/security/cve/CVE-2005-3353
suse.com/security/cve/CVE-2005-3388
suse.com/security/cve/CVE-2005-3389
suse.com/security/cve/CVE-2005-3390
suse.com/security/cve/CVE-2005-3391
suse.com/security/cve/CVE-2005-3392
suse.com/security/cve/CVE-2006-0996
suse.com/security/cve/CVE-2006-1017
suse.com/security/cve/CVE-2006-1490
suse.com/security/cve/CVE-2006-1494
suse.com/security/cve/CVE-2006-1991
suse.com/security/cve/CVE-2007-4783
suse.com/security/cve/CVE-2007-4887
suse.com/security/cve/CVE-2008-0599
suse.com/security/cve/CVE-2018-1000888
suse.com/security/cve/CVE-2021-21706
suse.com/security/cve/CVE-2006-7243
suse.com/security/cve/CVE-2010-2225
suse.com/security/cve/CVE-2010-2950
suse.com/security/cve/CVE-2010-3436
suse.com/security/cve/CVE-2010-3709
suse.com/security/cve/CVE-2010-3710
suse.com/security/cve/CVE-2010-4150
suse.com/security/cve/CVE-2010-4645
suse.com/security/cve/CVE-2011-0420
suse.com/security/cve/CVE-2011-0421
suse.com/security/cve/CVE-2011-0708
suse.com/security/cve/CVE-2011-1092
suse.com/security/cve/CVE-2011-1153
suse.com/security/cve/CVE-2011-1466
suse.com/security/cve/CVE-2011-2202
suse.com/security/cve/CVE-2011-3379
suse.com/security/cve/CVE-2011-4153
suse.com/security/cve/CVE-2011-4566
suse.com/security/cve/CVE-2011-4885
suse.com/security/cve/CVE-2012-0830
suse.com/security/cve/CVE-2012-1823
suse.com/security/cve/CVE-2012-2688
suse.com/security/cve/CVE-2012-3365
suse.com/security/cve/CVE-2013-1635
suse.com/security/cve/CVE-2013-1643
suse.com/security/cve/CVE-2013-4113
suse.com/security/cve/CVE-2013-4248
suse.com/security/cve/CVE-2013-6420
suse.com/security/cve/CVE-2013-6712
suse.com/security/cve/CVE-2013-7327
suse.com/security/cve/CVE-2013-7345
suse.com/security/cve/CVE-2014-0185
suse.com/security/cve/CVE-2014-0238
suse.com/security/cve/CVE-2014-1943
suse.com/security/cve/CVE-2014-2497
suse.com/security/cve/CVE-2014-3538
suse.com/security/cve/CVE-2014-3597
suse.com/security/cve/CVE-2014-3622
suse.com/security/cve/CVE-2014-3668
suse.com/security/cve/CVE-2014-3670
suse.com/security/cve/CVE-2014-4049
suse.com/security/cve/CVE-2014-4670
suse.com/security/cve/CVE-2014-4698
suse.com/security/cve/CVE-2014-5459
suse.com/security/cve/CVE-2014-9426
suse.com/security/cve/CVE-2014-9427
suse.com/security/cve/CVE-2015-0231
suse.com/security/cve/CVE-2015-0235
suse.com/security/cve/CVE-2015-0273
suse.com/security/cve/CVE-2015-1351
suse.com/security/cve/CVE-2015-3152
suse.com/security/cve/CVE-2015-3414
suse.com/security/cve/CVE-2015-3415