Vulnerabilities / CVE-2016-4540

critical

CVE-2016-4540

php: OOB read in grapheme_stripos and grapheme_strpos when negative offset is used

Published Modified
In the Trivy database since at least 24 Oct 2026, 07:11 UTCWhen it arrived before that build is not recorded.

Severity by source

NVD9.8CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Red Hat4.3AV:N/AC:M/Au:N/C:N/I:N/A:P

Trivy's own label is CRITICAL. Rated critical by NVD. Rated lower by Red Hat (low), Ubuntu (low).

Description

The grapheme_stripos function in ext/intl/grapheme/grapheme_string.c in PHP before 5.5.35, 5.6.x before 5.6.21, and 7.x before 7.0.6 allows remote attackers to cause a denial of service (out-of-bounds read) or possibly have unspecified other impact via a negative offset.

Affected packages and fixed versions

SourcePackageFixed in
debian 7php55.4.45-0+deb7u3
debian 8php55.6.22+dfsg-0+deb8u1
Red Hatphp, php-bcmath, php-cli and 25 moreno fix listed
ubuntu 12.04php55.3.10-1ubuntu3.23
ubuntu 14.04php55.5.9+dfsg-1ubuntu4.17
ubuntu 14.04-ESMphp55.5.9+dfsg-1ubuntu4.17
ubuntu 15.10php55.6.11+dfsg-1ubuntu3.4
ubuntu 16.04php7.07.0.4-7ubuntu2.1
ubuntu 16.04-ESMphp7.07.0.4-7ubuntu2.1
Show all 36 entries from 9 sources
SourcePackageFixed in
debian 7php55.4.45-0+deb7u3
debian 8php55.6.22+dfsg-0+deb8u1
Red Hatphpno fix listed
Red Hatphp-bcmathno fix listed
Red Hatphp-clino fix listed
Red Hatphp-commonno fix listed
Red Hatphp-dbano fix listed
Red Hatphp-develno fix listed
Red Hatphp-embeddedno fix listed
Red Hatphp-enchantno fix listed
Red Hatphp-fpmno fix listed
Red Hatphp-gdno fix listed
Red Hatphp-imapno fix listed
Red Hatphp-intlno fix listed
Red Hatphp-ldapno fix listed
Red Hatphp-mbstringno fix listed
Red Hatphp-mysqlno fix listed
Red Hatphp-mysqlndno fix listed
Red Hatphp-odbcno fix listed
Red Hatphp-pdono fix listed
Red Hatphp-pgsqlno fix listed
Red Hatphp-processno fix listed
Red Hatphp-pspellno fix listed
Red Hatphp-recodeno fix listed
Red Hatphp-snmpno fix listed
Red Hatphp-soapno fix listed
Red Hatphp-tidyno fix listed
Red Hatphp-xmlno fix listed
Red Hatphp-xmlrpcno fix listed
Red Hatphp-ztsno fix listed
ubuntu 12.04php55.3.10-1ubuntu3.23
ubuntu 14.04php55.5.9+dfsg-1ubuntu4.17
ubuntu 14.04-ESMphp55.5.9+dfsg-1ubuntu4.17
ubuntu 15.10php55.6.11+dfsg-1ubuntu3.4
ubuntu 16.04php7.07.0.4-7ubuntu2.1
ubuntu 16.04-ESMphp7.07.0.4-7ubuntu2.1

References

All 19 references

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.