Description
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.
In plain language
AI Worth attentionThis PHP bug can make your server crash (and, rarely, potentially run unexpected code) if you use the PHP Fileinfo feature with a specially crafted “magic file”; most small businesses should update PHP to the fixed versions if you’re running vulnerable PHP.
In PHP’s Fileinfo component, CVE-2015-8865 is caused by a memory-handling flaw in the file_check_mem function (CWE-119), where mishandled continuation-level jumps in processing a crafted magic file can trigger a denial of service and, in some cases, lead to code execution—an attacker typically needs a path to influence what PHP processes.
What to do now
- Check which PHP version your business is running and whether the Fileinfo functionality is used (for example, any app logic that inspects files using PHP’s fileinfo).
- If you are on PHP 5.5.34 or older, PHP 5.6.20 or older, or PHP 7.0.5 or older, plan an upgrade to at least PHP 5.5.34, 5.6.20, or 7.0.5 (or newer).
- If you rely on PHP bundled with Apple software, update your macOS / OS X to at least 10.11.5 or newer.
- After upgrading, test your file-type detection/inspection paths to ensure fileinfo still works and your app remains stable.
CVSS Vector Breakdown
AV:LAttack VectorAC:LAttack ComplexityPR:LPrivileges RequiredUI:RUser InteractionS:UScopeC:HConfidentialityI:HIntegrityA:HAvailabilityWeaknesses
Affected Products
Exploitability
Attack Graph
Click technique nodes for MITRE ATT&CK details · drag to pan · Ctrl/⌘ + scroll to zoom, or go fullscreen.
MITRE ATT&CK
2 techniquesReferences
Unlock Complete Vulnerability Intelligence
Get the full picture for CVE-2015-8865 and every CVE in our database. Create a free account — no credit card required.
Create Free Account