Vulnerabilities / CVE-2018-12882

critical

CVE-2018-12882

php: Use-after-free reachable via the exif.c:exif_read_from_impl() function

Published Modified CWE 416
In the Trivy database since at least 24 Oct 2026, 07:11 UTCWhen it arrived before that build is not recorded.

Severity by source

NVD9.8CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Red Hat6.3CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L

Trivy's own label is CRITICAL. Rated critical by NVD. Rated lower by Red Hat (medium), Amazon (medium), Ubuntu (medium).

Description

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.

Affected packages and fixed versions

SourcePackageFixed in
alpine 3.10php77.2.8-r0
alpine 3.11php77.2.8-r0
alpine 3.12php77.2.8-r0
alpine 3.13php77.2.8-r0
alpine 3.14php77.2.8-r0
alpine 3.15php77.2.8-r0
alpine 3.8php77.2.8-r0
alpine 3.9php77.2.8-r0
amazon linux 1php72, php72-bcmath, php72-cli and 29 more7.2.8-1.5.amzn1
ubuntu 18.04php7.27.2.7-0ubuntu0.18.04.2
ubuntu 18.04-ESMphp7.27.2.7-0ubuntu0.18.04.2
Show all 42 entries from 11 sources
SourcePackageFixed in
alpine 3.10php77.2.8-r0
alpine 3.11php77.2.8-r0
alpine 3.12php77.2.8-r0
alpine 3.13php77.2.8-r0
alpine 3.14php77.2.8-r0
alpine 3.15php77.2.8-r0
alpine 3.8php77.2.8-r0
alpine 3.9php77.2.8-r0
amazon linux 1php727.2.8-1.5.amzn1
amazon linux 1php72-bcmath7.2.8-1.5.amzn1
amazon linux 1php72-cli7.2.8-1.5.amzn1
amazon linux 1php72-common7.2.8-1.5.amzn1
amazon linux 1php72-dba7.2.8-1.5.amzn1
amazon linux 1php72-dbg7.2.8-1.5.amzn1
amazon linux 1php72-debuginfo7.2.8-1.5.amzn1
amazon linux 1php72-devel7.2.8-1.5.amzn1
amazon linux 1php72-embedded7.2.8-1.5.amzn1
amazon linux 1php72-enchant7.2.8-1.5.amzn1
amazon linux 1php72-fpm7.2.8-1.5.amzn1
amazon linux 1php72-gd7.2.8-1.5.amzn1
amazon linux 1php72-gmp7.2.8-1.5.amzn1
amazon linux 1php72-imap7.2.8-1.5.amzn1
amazon linux 1php72-intl7.2.8-1.5.amzn1
amazon linux 1php72-json7.2.8-1.5.amzn1
amazon linux 1php72-ldap7.2.8-1.5.amzn1
amazon linux 1php72-mbstring7.2.8-1.5.amzn1
amazon linux 1php72-mysqlnd7.2.8-1.5.amzn1
amazon linux 1php72-odbc7.2.8-1.5.amzn1
amazon linux 1php72-opcache7.2.8-1.5.amzn1
amazon linux 1php72-pdo7.2.8-1.5.amzn1
amazon linux 1php72-pdo-dblib7.2.8-1.5.amzn1
amazon linux 1php72-pgsql7.2.8-1.5.amzn1
amazon linux 1php72-process7.2.8-1.5.amzn1
amazon linux 1php72-pspell7.2.8-1.5.amzn1
amazon linux 1php72-recode7.2.8-1.5.amzn1
amazon linux 1php72-snmp7.2.8-1.5.amzn1
amazon linux 1php72-soap7.2.8-1.5.amzn1
amazon linux 1php72-tidy7.2.8-1.5.amzn1
amazon linux 1php72-xml7.2.8-1.5.amzn1
amazon linux 1php72-xmlrpc7.2.8-1.5.amzn1
ubuntu 18.04php7.27.2.7-0ubuntu0.18.04.2
ubuntu 18.04-ESMphp7.27.2.7-0ubuntu0.18.04.2

References

All 10 references

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.