Input validation error in PHP - CVE-2016-4538

 

Input validation error in PHP - CVE-2016-4538

Published: October 30, 2018 / Updated: June 8, 2025


Vulnerability identifier: #VU110264
CSH Severity: High
CVSS v4: 9.3 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2016-4538
CWE-ID: CWE-20
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote non-authenticated attacker to execute arbitrary code.

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 modifies certain data structures without considering whether they are copies of the _zero_, _one_, or _two_ global variable, which allows remote attackers to cause a denial of service or possibly have unspecified other impact via a crafted call.


Affected software

PHP
Fedora
php

How to mitigate CVE-2016-4538

Install update from vendor's website.

PHP - addressed in versions 5.6.21, 7.0.6
php - addressed in versions 5.6.21-1.fc22, 5.6.21-1.fc24

External References

Related Security Bulletins