Skip to content
OpenAdvisories
Unscored CVE-2017-9226 EUVD-2017-18164GHSA-q5wh-hr49-c2mq

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…

Published May 24, 2017 · Updated Aug 5, 2024 · Assigned by mitre

Description

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 next_state_val() during regular expression compilation. Octal numbers larger than 0xff are not handled correctly in fetch_token() and fetch_token_in_cc(). A malformed regular expression containing an octal number in the form of '\700' would produce an invalid code point value larger than 0xff in next_state_val(), resulting in an out-of-bounds write memory corruption.

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 libonig 6.1.3-2 —
Debian 13 libonig 6.1.3-2 —
Debian 12 libonig 6.1.3-2 —
Debian 7 libonig 5.9.1-1+deb7u1 DLA-958-1
ReleasePackageFixed inAdvisory
Ubuntu 16.04 LTS libonig 5.9.6-1ubuntu0.1 —
Ubuntu 16.04 LTS php7.0 7.0.22-0ubuntu0.16.04.1 USN-3382-1
Ubuntu 14.04 LTS libonig 5.9.1-1ubuntu1.1 —
Ubuntu 14.04 LTS php5 5.5.9+dfsg-1ubuntu4.22 USN-3382-1
ReleasePackageFixed inAdvisory
RHEL 3 rh-php70-php +29 7.0.27-1.el6 RHSA-2018:1296
ReleasePackageFixed inAdvisory
SLES 12 SP2 php5 5.5.14-108.1 SUSE-SU-2017:1662-1
SLES 12 SP2 php7 7.0.7-49.1 SUSE-SU-2017:1717-1
SLES 12 php5 5.5.14-108.1 SUSE-SU-2017:1662-1
SLES 12 php7 7.0.7-49.1 SUSE-SU-2017:1717-1
SLES 11 SP4 php53 5.3.17-108.1 SUSE-SU-2017:1585-1
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 11 SP4 php53 5.3.17-108.1 SUSE-SU-2017:1585-1
ReleasePackageFixed inAdvisory
Alpine v3.8 php5 5.6.31-r0 —
Alpine v3.7 php5 5.6.31-r0 —
Alpine v3.7 php7 7.1.7-r0 —
Alpine v3.6 php5 5.6.31-r0 —
Alpine v3.6 php7 7.1.9-r0 —
Alpine v3.5 php5 5.6.31-r0 —
Alpine v3.5 php7 7.0.21-r0 —
Alpine v3.4 php5 5.6.31-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2 oniguruma +1 5.9.6-1.amzn2.0.7 ALAS2-2023-2311
Amazon Linux 2 php +23 5.4.16-46.amzn2.0.6 ALAS2-2025-2832

Advisories 9

References