CVE-2017-9227
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 stack out-of-bounds read occurs in mbc_enc_len() during regular expression searching. Invalid handling of reg->dmin in forward_search_range() could result in an invalid pointer dereference, as an out-of-bounds read from a stack buffer.
What to do
Fixed builds are available from Alpine, Debian, Ubuntu: see the table below for the fixed version per release.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 16.04 | libonig | Fixed | 5.9.6-1ubuntu0.1 | UBUNTU-CVE-2017-9227 |
| Ubuntu 16.04 | php7.0 | Fixed | 7.0.22-0ubuntu0.16.04.1 | UBUNTU-CVE-2017-9227 |
| Ubuntu 14.04 | libonig | Fixed | 5.9.1-1ubuntu1.1 | UBUNTU-CVE-2017-9227 |
| Ubuntu 14.04 | php5 | Fixed | 5.5.9+dfsg-1ubuntu4.22 | UBUNTU-CVE-2017-9227 |
| Debian 14 | libonig | Fixed | 6.1.3-2 | DEBIAN-CVE-2017-9227 |
| Debian 13 | libonig | Fixed | 6.1.3-2 | DEBIAN-CVE-2017-9227 |
| Debian 12 | libonig | Fixed | 6.1.3-2 | DEBIAN-CVE-2017-9227 |
| Red Hat Enterprise Linux 7 | php | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | php-bcmath | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | php-cli | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | php-common | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | php-dba | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | php-devel | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | php-embedded | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | php-enchant | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | php-fpm | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | php-gd | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | php-intl | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | php-ldap | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | php-mbstring | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | php-mysql | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | php-mysqlnd | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | php-odbc | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | php-pdo | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | php-pgsql | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | php-process | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | php-pspell | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | php-recode | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | php-snmp | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | php-soap | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | php-xml | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | php-xmlrpc | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | ruby | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | ruby-devel | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | ruby-doc | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | ruby-irb | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | ruby-libs | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | ruby-tcltk | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | rubygem-bigdecimal | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | rubygem-io-console | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | rubygem-json | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | rubygem-minitest | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | rubygem-psych | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | rubygem-rake | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | rubygem-rdoc | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | rubygems | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | rubygems-devel | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | oniguruma | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | oniguruma-devel | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-bcmath | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-cli | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-common | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-dba | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-devel | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-embedded | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-enchant | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-fpm | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-gd | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-imap | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-intl | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-ldap | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-mbstring | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-mysql | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-odbc | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-pdo | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-pgsql | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-process | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-pspell | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-recode | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-snmp | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-soap | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-tidy | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-xml | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-xmlrpc | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-zts | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ruby | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ruby-devel | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ruby-docs | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ruby-irb | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ruby-libs | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ruby-rdoc | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ruby-ri | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ruby-static | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ruby-tcltk | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 5 | php | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 5 | php53 | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 5 | ruby | Will not fix Will not fix | ||
| Alpine Linux 3.8 | php5 | Fixed | 5.6.31-r0 | ALPINE-CVE-2017-9227 |
| Alpine Linux 3.7 | php5 | Fixed | 5.6.31-r0 | ALPINE-CVE-2017-9227 |
| Alpine Linux 3.7 | php7 | Fixed | 7.1.7-r0 | ALPINE-CVE-2017-9227 |
| Alpine Linux 3.6 | php5 | Fixed | 5.6.31-r0 | ALPINE-CVE-2017-9227 |
| Alpine Linux 3.6 | php7 | Fixed | 7.1.9-r0 | ALPINE-CVE-2017-9227 |
| Alpine Linux 3.5 | php5 | Fixed | 5.6.31-r0 | ALPINE-CVE-2017-9227 |
| Alpine Linux 3.5 | php7 | Fixed | 7.0.21-r0 | ALPINE-CVE-2017-9227 |
| Alpine Linux 3.4 | php5 | Fixed | 5.6.31-r0 | ALPINE-CVE-2017-9227 |
What the vendor says
As published in the CVE record by mitre, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
Vendor advisories:
- https://access.redhat.com/errata/RHSA-2018:1296 (vendor-advisory)
References
- https://access.redhat.com/errata/RHSA-2018:1296
- http://www.securityfocus.com/bid/100538
- https://github.com/kkos/oniguruma/issues/58
- https://github.com/kkos/oniguruma/commit/9690d3ab1f9bcd2db8cbe1fe3ee4a5da606b8814
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.