CVE-2016-4537

The bcpowmod function in ext/bcmath/bcmath.c in PHP before 5.5.35, 5.6.x before 5.6.21, and 7.x before 7.0.6 accepts a negative integer for the scale argument…

published May 22, 2016

CVSS
—
EPSS
6%
Percentile
93.0
In the wild
Unconfirmed
What it is

⚠️ A negative integer in the wrong place can crash your server! The bcpowmod function in PHP is vulnerable to a sneaky denial-of-service attack before versions 5.5.35, 5.6.21, and 7.0.6. 🔥 Think of it like a restaurant that serves only one size of meal, but a customer accidentally orders a negative portion — chaos ensues in the kitchen as they try to figure out how to serve that! An attacker could exploit this vulnerability by sending a crafted call, leading the server to spiral out of control and possibly crash. If your server is down, customers won't be able to access your services, and you could face substantial downtime.

Put simply

Think of it like a restaurant that serves only one size of meal, but a customer accidentally orders a negative portion — chaos ensues in the kitchen as they try to figure out how to serve that! This vulnerability occurs because the bcpowmod function in PHP accepts a negative integer for the scale argument, which can trigger unexpected behavior, including denial of service.

What to do

An attacker could exploit this vulnerability by sending a crafted call, leading the server to spiral out of control and possibly crash. If your server is down, customers won't be able to access your services, and you could face substantial downtime. Upgrade your PHP version to at least 5.5.35, 5.6.21, or 7.0.6 to mitigate this issue. Always review your code for function arguments, ensuring they only accept expected values to avoid similar pitfalls. You've got this! Follow these steps and keep your servers running smoothly! 🛡️

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.05716 · 93.0th percentile
Published
2016-05-22T01:00Z
EPSS history
Timeline
  • 22 MAY 01:00Z
    The bcpowmod function in ext/bcmath/bcmath.c in PHP before 5.5.35, 5.6.x before 5.6.21, and 7.x before 7.0.6 accepts a negative integer for the scale argument…
    cvelistv5