# CVE-2016-10160: PHP off-by-one error in phar_parse_pharfile

Source: https://junglewise.ai/threats/cve-2016-10160-php-off-by-one-error-in-phar-parse-pharfile  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2017-01-24. Updated: 2026-05-13  
License: CC BY 4.0 with a link back

CVE-2016-10160 · Severity: critical · CVSS 9.8 · Published 2017-01-24

PHP is a widely used programming language for web development. A flaw in how it handles PHAR archive files allows an attacker to send a specially crafted file that can crash the server or potentially allow the attacker to run unauthorized code. This could lead to a total compromise of the web server and any data it manages.

Technologies: [Debian Linux](https://junglewise.ai/threats/technologies/debian), [PHP Group PHP](https://junglewise.ai/threats/technologies/php). Vendors: [Debian](https://junglewise.ai/threats/vendors/debian), [NetApp](https://junglewise.ai/threats/vendors/netapp), [PHP Group](https://junglewise.ai/threats/vendors/php-group).

## Quick answers

**Is CVE-2016-10160 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2016-10160 being exploited in the wild.

**How severe is CVE-2016-10160?** Critical severity, with a CVSS score of 9.8, published 24 January 2017.

**Which products and versions are affected?** PHP Group PHP before 5.6.30, 7.0.x before 7.0.15.

**Is there a fix for CVE-2016-10160?** A patch was published on 2017-01-19: PHP 5.6.30 release date Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2016-10160 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2016-10160?** Check whether you run Debian Linux, NetApp Clustered Data Ontap or PHP Group PHP at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

An off-by-one error exists in the 'phar_parse_pharfile' function within 'ext/phar/phar.c' in PHP. The vulnerability is triggered when processing a crafted PHAR archive that contains an alias mismatch. This memory corruption flaw can be exploited by a remote, unauthenticated attacker to cause a denial of service (crash) or potentially achieve remote code execution (RCE). The issue was addressed in PHP versions 5.6.30 and 7.0.15.

## Affected products

- PHP PHP before 5.6.30, 7.0.x before 7.0.15

## Timeline

- 2017-01-24: advisory: NVD publication date
- 2017-01-19: patched: PHP 5.6.30 release date

## References

- [http://php.net/ChangeLog-5.php](http://php.net/ChangeLog-5.php)
- [http://php.net/ChangeLog-7.php](http://php.net/ChangeLog-7.php)
- [http://www.debian.org/security/2017/dsa-3783](http://www.debian.org/security/2017/dsa-3783)
- [http://www.securityfocus.com/bid/95783](http://www.securityfocus.com/bid/95783)
- [http://www.securitytracker.com/id/1037659](http://www.securitytracker.com/id/1037659)
- [https://access.redhat.com/errata/RHSA-2018:1296](https://access.redhat.com/errata/RHSA-2018:1296)
- [https://bugs.php.net/bug.php?id=73768](https://bugs.php.net/bug.php?id=73768)

## Related threats

- [PHP use-after-free in global state handling](https://junglewise.ai/threats/cve-2026-109619-php-has-various-global-state-that-temporarily-points-into)
- [PHP Memory Corruption Vulnerability](https://junglewise.ai/threats/cve-2026-109618-gcp-2026-070)
- [PHP Phar uncontrolled recursion in phar_get_link_source](https://junglewise.ai/threats/cve-2026-7260-php-phar-uncontrolled-recursion-in-phar-get-link-source)
- [PHP BCMath out-of-bounds write in bccomp](https://junglewise.ai/threats/cve-2026-17544-php-bcmath-out-of-bounds-write-in-bccomp)
- [PHP ext-pgsql SQL injection in pg_select and related functions](https://junglewise.ai/threats/cve-2026-17543-php-ext-pgsql-sql-injection-in-pg-select-and-related-functions)
