CVE-2017-9226: Critical severity PHP PHP vulnerability

Published May 18, 2017
·
Updated

Add oniguruma upstream fix (CVE-2017-9224, CVE-2017-9226, CVE-2017-9227, CVE-2017-9228, CVE-2017-9229)

Other sources

An issue was discovered in Oniguruma 6.2.0, as used in Oniguruma-mod in Ruby through 2.4.1 and mbstring in PHP through 7.1.5. A heap out-of-bounds write or read occurs in nextstateval() during regular expression compilation. Octal numbers larger than 0xff are not handled correctly in fetchtoken() and fetchtokenincc(). A malformed regular expression containing an octal number in the form of '\700' would produce an invalid code point value larger than 0xff in nextstateval(), resulting in an out-of-bounds write memory corruption. Upstream bug:

https://github.com/kkos/oniguruma/issues/55

Upstream patch:

https://github.com/kkos/oniguruma/commit/f015fbdd95f76438cd86366467bb2b39870dd7c6

Red Hat

Affected Software

12 affected componentsFixes available
redhat/rh-php70-php<0:7.0.27-1.el6
0:7.0.27-1.el6
redhat/rh-php70-php<0:7.0.27-1.el7
0:7.0.27-1.el7
redhat/oniguruma<6.3.0
6.3.0
redhat/php<5.6.31
5.6.31
redhat/php<7.0.21
7.0.21
redhat/php<7.1.7
7.1.7
debian/libonig
6.9.6-1.16.9.8-16.9.9-1
PHP PHP<7.0.21
7.0.21
Oniguruma Project Oniguruma=6.2.0
PHP PHP<5.6.31
PHP PHP>=7.0.0<7.0.21
PHP PHP>=7.1.0<7.1.7

Event History

May 18, 2017
CVE Published
12:00 AM
May 24, 2017
CVE Published
via MITRE·03:00 PM
Data Sourced
via MITRE·03:00 PM
Description
Jan 11, 2024
Data Sourced
via Launchpad·10:42 PM
Description
Sep 16, 2024
Data Sourced
via Ubuntu·01:23 AM
RemedyDescriptionSeverityAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is CVE-2017-9226?

CVE-2017-9226 is a vulnerability in Oniguruma, as used in Oniguruma-mod in Ruby and mbstring in PHP, that allows a heap out-of-bounds write or read during regular expression compilation.

2

Which software is affected by CVE-2017-9226?

CVE-2017-9226 affects Oniguruma-mod in Ruby versions up to 2.4.1 and mbstring in PHP versions up to 7.1.5.

3

What is the severity of CVE-2017-9226?

CVE-2017-9226 has a severity rating of 9.8, which is considered critical.

4

How do I fix CVE-2017-9226 in Oniguruma?

To fix CVE-2017-9226 in Oniguruma, you should upgrade to version 6.3.0 or higher.

5

How do I fix CVE-2017-9226 in PHP?

To fix CVE-2017-9226 in PHP, you should upgrade to version 7.0.21 or higher for PHP 7.0, and version 7.1.7 or higher for PHP 7.1.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203