Skip to content
Fencer Vulns
critical 9.8

CVE-2017-9227 in the critical feed json

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.

published 2017-05-24 9 y ago modified 2026-06-17 4 mo ago also EUVD-2017-18165

cvss
9.8
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
6.3%
EPSS 6.3% chance of exploitation in 30 days, percentile 93%
public exploits
0
none known

Summary

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.

Patch / fix

  • php php 5.6.31, 7.0.21, 7.1.7
  • libonig Debian 14, Debian 13, Debian 12 6.1.3-2

debian advisories DEBIAN-CVE-2017-9227

  • php5 Ubuntu 14.04 LTS 5.5.9+dfsg-1ubuntu4.22
  • php7.0 Ubuntu 16.04 LTS 7.0.22-0ubuntu0.16.04.1
  • libonig Ubuntu 14.04 LTS 5.9.1-1ubuntu1.1
  • libonig Ubuntu 16.04 LTS 5.9.6-1ubuntu0.1

ubuntu advisories UBUNTU-CVE-2017-9227

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • rh-php70-php RHEL 3 SOFTWARE_COLLECTIONS 7.0.27-1.el6
  • rh-php70-php RHEL 3 SOFTWARE_COLLECTIONS 7.0.27-1.el7
  • rh-php70-php-gd RHEL 3 SOFTWARE_COLLECTIONS 7.0.27-1.el6
  • rh-php70-php-gd RHEL 3 SOFTWARE_COLLECTIONS 7.0.27-1.el7
  • rh-php70-php-cli RHEL 3 SOFTWARE_COLLECTIONS 7.0.27-1.el6
  • rh-php70-php-cli RHEL 3 SOFTWARE_COLLECTIONS 7.0.27-1.el7
  • rh-php70-php-dba RHEL 3 SOFTWARE_COLLECTIONS 7.0.27-1.el6
  • rh-php70-php-dba RHEL 3 SOFTWARE_COLLECTIONS 7.0.27-1.el7

red hat advisories RHSA-2018:1296

  • php7 SLE Software Development Kit 12 SP2, SLE Module for Web and Scripting 12 7.0.7-49.1
  • php5 SLE Software Development Kit 12 SP2, SLE Module for Web and Scripting 12 5.5.14-108.1
  • php53 SLES for SAP 11 SP4, SLES 11 SP4, SLE Software Development Kit 11 SP4 5.3.17-108.1

suse advisories SUSE-SU-2017:1717-1SUSE-SU-2017:1662-1SUSE-SU-2017:1585-1

  • php5 Alpine 3.8, Alpine 3.7, Alpine 3.6 +2 more 5.6.31-r0
  • php7 Alpine 3.5 7.0.21-r0
  • php7 Alpine 3.6 7.1.9-r0
  • php7 Alpine 3.7 7.1.7-r0

alpine advisories ALPINE-CVE-2017-9227

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2017-9227 updated cvss 5.9

oniguruma: Out-of-bounds stack read in mbc_enc_len() during regular expression searching

  • Red Hat Enterprise Linux 5 php, ruby, php53 Red Hat Enterprise Linux 6 php, ruby, php-gd, php-cli, php-dba, php-fpm, +27 more Red Hat Enterprise Linux 7 php, ruby, php-gd, php-cli, php-dba, php-fpm, +30 more Red Hat Software Collections rh-php56-php, rh-ruby22-ruby, rh-ruby23-ruby, rh-ruby24-ruby, rh-php56-php-gd, rh-php56-php-cli, +69 more
    affected: no fix planned “Will not fix”
  • Red Hat CloudForms Management Engine 5 ruby-200-ruby, rh-ruby22-ruby Red Hat OpenShift Enterprise 2 php Red Hat Subscription Asset Manager ruby193-ruby
    under investigation
  • Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 6) rh-php70-php 7.0.27-1.el6, rh-php70-php-gd 7.0.27-1.el6, rh-php70-php-cli 7.0.27-1.el6, rh-php70-php-dba 7.0.27-1.el6, rh-php70-php-dbg 7.0.27-1.el6, rh-php70-php-fpm 7.0.27-1.el6, +24 more Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-php70-php 7.0.27-1.el7, rh-php70-php-gd 7.0.27-1.el7, rh-php70-php-cli 7.0.27-1.el7, rh-php70-php-dba 7.0.27-1.el7, rh-php70-php-dbg 7.0.27-1.el7, rh-php70-php-fpm 7.0.27-1.el7, +22 more Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 6.7) rh-php70-php 7.0.27-1.el6, rh-php70-php-gd 7.0.27-1.el6, rh-php70-php-cli 7.0.27-1.el6, rh-php70-php-dba 7.0.27-1.el6, rh-php70-php-dbg 7.0.27-1.el6, rh-php70-php-fpm 7.0.27-1.el6, +24 more Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.3) rh-php70-php 7.0.27-1.el7, rh-php70-php-gd 7.0.27-1.el7, rh-php70-php-cli 7.0.27-1.el7, rh-php70-php-dba 7.0.27-1.el7, rh-php70-php-dbg 7.0.27-1.el7, rh-php70-php-fpm 7.0.27-1.el7, +22 more Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.4) rh-php70-php 7.0.27-1.el7, rh-php70-php-gd 7.0.27-1.el7, rh-php70-php-cli 7.0.27-1.el7, rh-php70-php-dba 7.0.27-1.el7, rh-php70-php-dbg 7.0.27-1.el7, rh-php70-php-fpm 7.0.27-1.el7, +22 more Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.5) rh-php70-php 7.0.27-1.el7, rh-php70-php-gd 7.0.27-1.el7, rh-php70-php-cli 7.0.27-1.el7, rh-php70-php-dba 7.0.27-1.el7, rh-php70-php-dbg 7.0.27-1.el7, rh-php70-php-fpm 7.0.27-1.el7, +22 more
    +2 more products
    Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 6) rh-php70-php 7.0.27-1.el6, rh-php70-php-gd 7.0.27-1.el6, rh-php70-php-cli 7.0.27-1.el6, rh-php70-php-dba 7.0.27-1.el6, rh-php70-php-dbg 7.0.27-1.el6, rh-php70-php-fpm 7.0.27-1.el6, +24 more Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-php70-php 7.0.27-1.el7, rh-php70-php-gd 7.0.27-1.el7, rh-php70-php-cli 7.0.27-1.el7, rh-php70-php-dba 7.0.27-1.el7, rh-php70-php-dbg 7.0.27-1.el7, rh-php70-php-fpm 7.0.27-1.el7, +22 more
    fixed: vendor fix RHSA-2018:1296

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

6.26% chance of exploitation in the next 30 days, higher than 93% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • github.com https://github.com/kkos/oniguruma/issues/58 referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
NVD 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD 2.0 7.5 AV:N/AC:L/Au:N/C:P/I:P/A:P

Classification

Weakness
Technology feeds

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.