CVE-2015-8865 json
The file_check_mem function in funcs.c in file before 5.23, as used in the Fileinfo component in PHP before 5.5.34, 5.6.x before 5.6.20, an…
published 2016-05-20 10 y ago modified 2026-06-17 4 mo ago also EUVD-2015-8721
- cvss
- 7.3
- version 3.0, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 5.5%
- EPSS 5.5% chance of exploitation in 30 days, percentile 92%
- public exploits
- 0
- none known
Summary
The file_check_mem function in funcs.c in file before 5.23, as used in the Fileinfo component in PHP before 5.5.34, 5.6.x before 5.6.20, and 7.x before 7.0.5, mishandles continuation-level jumps, which allows context-dependent attackers to cause a denial of service (buffer overflow and application crash) or possibly execute arbitrary code via a crafted magic file.
Patch / fix
- file Debian 14, Debian 13, Debian 12 1:5.24-1
debian advisories DEBIAN-CVE-2015-8865
- file Ubuntu 14.04 LTS 1:5.14-2ubuntu3.4
- php5 Ubuntu 14.04 LTS 5.5.9+dfsg-1ubuntu4.16
- php7.0 Ubuntu 16.04 LTS 7.0.4-7ubuntu2.1
ubuntu advisories UBUNTU-CVE-2015-8865
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- rh-php56 RHEL 2 SOFTWARE_COLLECTIONS 2.3-1.el6
- rh-php56 RHEL 2 SOFTWARE_COLLECTIONS 2.3-1.el7
- rh-php56-php RHEL 2 SOFTWARE_COLLECTIONS 5.6.25-1.el6
- rh-php56-php RHEL 2 SOFTWARE_COLLECTIONS 5.6.25-1.el7
- rh-php56-php-gd RHEL 2 SOFTWARE_COLLECTIONS 5.6.25-1.el6
- rh-php56-php-gd RHEL 2 SOFTWARE_COLLECTIONS 5.6.25-1.el7
- rh-php56-php-cli RHEL 2 SOFTWARE_COLLECTIONS 5.6.25-1.el6
- rh-php56-php-cli RHEL 2 SOFTWARE_COLLECTIONS 5.6.25-1.el7
red hat advisories RHSA-2016:2750
- github.com/file/file@6713ca4 commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2015-8865 updated cvss 5.6
file: Buffer over-write in finfo_open with malformed magic file
-
Red Hat Enterprise Linux 5 rpm, file, php53, cdrtools Red Hat Enterprise Linux 6 php, file, php-gd, php-cli, php-dba, php-fpm, +23 more Red Hat Enterprise Linux 7 php, file, php-gd, php-cli, php-dba, php-fpm, +21 more Red Hat Software Collections php54-php, php55-php, php54-php-gd, php55-php-gd, php54-php-cli, php54-php-dba, +44 moreaffected: workaround, no fix planned “Do not use untrusted magic files.”
-
Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 6) rh-php56 2.3-1.el6, rh-php56-php 5.6.25-1.el6, rh-php56-runtime 2.3-1.el6, rh-php56-scldevel 2.3-1.el6, rh-php56-php-gd 5.6.25-1.el6, rh-php56-php-cli 5.6.25-1.el6, +26 more Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-php56 2.3-1.el7, rh-php56-php 5.6.25-1.el7, rh-php56-runtime 2.3-1.el7, rh-php56-scldevel 2.3-1.el7, rh-php56-php-gd 5.6.25-1.el7, rh-php56-php-cli 5.6.25-1.el7, +24 more Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 6.7) rh-php56 2.3-1.el6, rh-php56-php 5.6.25-1.el6, rh-php56-runtime 2.3-1.el6, rh-php56-scldevel 2.3-1.el6, rh-php56-php-gd 5.6.25-1.el6, rh-php56-php-cli 5.6.25-1.el6, +26 more Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.2) rh-php56 2.3-1.el7, rh-php56-php 5.6.25-1.el7, rh-php56-runtime 2.3-1.el7, rh-php56-scldevel 2.3-1.el7, rh-php56-php-gd 5.6.25-1.el7, rh-php56-php-cli 5.6.25-1.el7, +24 more Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.3) rh-php56 2.3-1.el7, rh-php56-php 5.6.25-1.el7, rh-php56-runtime 2.3-1.el7, rh-php56-scldevel 2.3-1.el7, rh-php56-php-gd 5.6.25-1.el7, rh-php56-php-cli 5.6.25-1.el7, +24 more Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 6) rh-php56 2.3-1.el6, rh-php56-php 5.6.25-1.el6, rh-php56-runtime 2.3-1.el6, rh-php56-scldevel 2.3-1.el6, rh-php56-php-gd 5.6.25-1.el6, rh-php56-php-cli 5.6.25-1.el6, +26 morefixed: vendor fix “Do not use untrusted magic files.” RHSA-2016:2750
+1 more productsfewer
Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-php56 2.3-1.el7, rh-php56-php 5.6.25-1.el7, rh-php56-runtime 2.3-1.el7, rh-php56-scldevel 2.3-1.el7, rh-php56-php-gd 5.6.25-1.el7, rh-php56-php-cli 5.6.25-1.el7, +24 more
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
5.48% chance of exploitation in the next 30 days, higher than 92% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
- bugs.php.net https://bugs.php.net/bug.php?id=71527 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.0 | 7.3 | CVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Classification
- Weakness
-
- CWE-119 Improper Restriction of Operations within the Bounds of a Memory Buffer
- Technology feeds
References
- github.com /file/file/commit/6713ca45e7757297381f4b4cdb9cf5e624a9ad36
-
bugs.php.net
/bug.php?id=71527
exploit
-
ubuntu.com
/usn/USN-2952-1
vendor-advisory
-
security.gentoo.org
/glsa/201611-22
vendor-advisory
-
usn.ubuntu.com
/3686-1/
vendor-advisory
-
rhn.redhat.com
/errata/RHSA-2016-2750.html
vendor-advisory
-
debian.org
/security/2016/dsa-3560
vendor-advisory
-
ubuntu.com
/usn/USN-2952-2
vendor-advisory
-
usn.ubuntu.com
/3686-2/
vendor-advisory
-
lists.apple.com
/archives/security-announce/2016/May/msg00004.html
vendor-advisory
-
lists.opensuse.org
/opensuse-security-announce/2016-04/msg00057.html
vendor-advisory
-
security.gentoo.org
/glsa/201701-42
vendor-advisory
- php.net /ChangeLog-7.php
-
securityfocus.com
/bid/85802
vdb-entry
- support.apple.com /HT206567
- git.php.net /?p=php-src.git%3Ba=commit%3Bh=fe13566c93f118a15a96320a546c7878fd0cfc5e
- php.net /ChangeLog-5.php
- h20566.www2.hpe.com /portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c05240731
-
openwall.com
/lists/oss-security/2016/04/24/1
mailing-list
- bugs.gw.com /view.php?id=522
Sources
- CVE List CVE-2015-8865
- NVD CVE-2015-8865
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.