CVE-2016-10160

Off-by-one error in the phar_parse_pharfile function in ext/phar/phar.c in PHP before 5.6.30 and 7.0.x before 7.0.15 allows remote attackers to cause a denial…

published January 24, 2017

CVSS
—
EPSS
7%
Percentile
94.4
In the wild
Unconfirmed
What it is

⚠️ An off-by-one error in PHP could lead to memory corruption! This sneaky flaw in the phar_parse_pharfile function is like a factory missing an essential inspection step, allowing attackers to wreak havoc with crafted PHAR archives.🔥 Think of it like a restaurant that miscounts its ingredients. If the chef mistakenly thinks they have one more tomato than they actually do, they might use it in a dish that's already been prepped, causing a disastrous mix-up in the kitchen—or in this case, a memory corruption! An attacker could exploit this to trigger a denial of service, potentially crashing the server or leading to arbitrary code execution! Imagine your favorite site suddenly going dark because of a single miscount. It's alarming and could disrupt services!

Put simply

Think of it like a restaurant that miscounts its ingredients. If the chef mistakenly thinks they have one more tomato than they actually do, they might use it in a dish that's already been prepped, causing a disastrous mix-up in the kitchen—or in this case, a memory corruption! This vulnerability arises due to an off-by-one error in how the PHP engine handles PHAR archives, specifically in the phar_parse_pharfile function in versions before 5.6.30 and 7.0.x before 7.0.15. This oversight could allow attackers to craft specially maligned archives that corrupt memory and may even lead to code execution.

What to do

An attacker could exploit this to trigger a denial of service, potentially crashing the server or leading to arbitrary code execution! Imagine your favorite site suddenly going dark because of a single miscount. It's alarming and could disrupt services! Update your PHP version immediately to at least 5.6.30 or 7.0.15 to patch this vulnerability. Regularly audit your PHAR handling practices to ensure they are secure, and consider implementing strict checks when processing user-uploaded files. You've got this! By updating and patching, you're not just fixing a flaw—you're fortifying your defenses! 🛡️

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.07381 · 94.4th percentile
Published
2017-01-24T21:00Z
EPSS history
Timeline
  • 24 JAN 21:00Z
    Off-by-one error in the phar_parse_pharfile function in ext/phar/phar.c in PHP before 5.6.30 and 7.0.x before 7.0.15 allows remote attackers to cause a denial…
    cvelistv5