oniguruma: Out-of-bounds stack read in mbc_enc_len() during regular expression searching
Published May 24, 2017
9.8
CRITICALCVSS 3.1
EPSS 6.26%
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 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.
Affected products
No data.
No data.
Red Hat Software Collections for Red Hat Enterprise Linux 6
rh-php70-php-0:7.0.27-1.el6
Fixed · RHSA-2018:1296
Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
rh-php70-php-0:7.0.27-1.el6
Fixed · RHSA-2018:1296
Red Hat Software Collections for Red Hat Enterprise Linux 7
rh-php70-php-0:7.0.27-1.el7
Fixed · RHSA-2018:1296
Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS
rh-php70-php-0:7.0.27-1.el7
Fixed · RHSA-2018:1296
Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS
rh-php70-php-0:7.0.27-1.el7
Fixed · RHSA-2018:1296
Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS
rh-php70-php-0:7.0.27-1.el7
Fixed · RHSA-2018:1296
CloudForms Management Engine 5
rh-ruby22-ruby
Under investigation
CloudForms Management Engine 5
ruby-200-ruby
Under investigation
Red Hat Enterprise Linux 5
php
Will not fix
Red Hat Enterprise Linux 5
php53
Will not fix
Red Hat Enterprise Linux 5
ruby
Will not fix
Red Hat Enterprise Linux 6
oniguruma
Will not fix
Red Hat Enterprise Linux 6
php
Will not fix
Red Hat Enterprise Linux 6
ruby
Will not fix
Red Hat Enterprise Linux 7
php
Will not fix
Red Hat Enterprise Linux 7
ruby
Will not fix
Red Hat OpenShift Enterprise 2
php
Under investigation
Red Hat Software Collections
rh-php56-php
Will not fix
Red Hat Software Collections
rh-ruby22-ruby
Will not fix
Red Hat Software Collections
rh-ruby23-ruby
Will not fix
Red Hat Software Collections
rh-ruby24-ruby
Will not fix
Red Hat Subscription Asset Manager
ruby193-ruby
Under investigation
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Software Collections for Red Hat Enterprise Linux 6 | rh-php70-php-0:7.0.27-1.el6 | Fixed | RHSA-2018:1296 |
| Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS | rh-php70-php-0:7.0.27-1.el6 | Fixed | RHSA-2018:1296 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7 | rh-php70-php-0:7.0.27-1.el7 | Fixed | RHSA-2018:1296 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS | rh-php70-php-0:7.0.27-1.el7 | Fixed | RHSA-2018:1296 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS | rh-php70-php-0:7.0.27-1.el7 | Fixed | RHSA-2018:1296 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS | rh-php70-php-0:7.0.27-1.el7 | Fixed | RHSA-2018:1296 |
| CloudForms Management Engine 5 | rh-ruby22-ruby | Under investigation | n/a |
| CloudForms Management Engine 5 | ruby-200-ruby | Under investigation | n/a |
| Red Hat Enterprise Linux 5 | php | Will not fix | n/a |
| Red Hat Enterprise Linux 5 | php53 | Will not fix | n/a |
| Red Hat Enterprise Linux 5 | ruby | Will not fix | n/a |
| Red Hat Enterprise Linux 6 | oniguruma | Will not fix | n/a |
| Red Hat Enterprise Linux 6 | php | Will not fix | n/a |
| Red Hat Enterprise Linux 6 | ruby | Will not fix | n/a |
| Red Hat Enterprise Linux 7 | php | Will not fix | n/a |
| Red Hat Enterprise Linux 7 | ruby | Will not fix | n/a |
| Red Hat OpenShift Enterprise 2 | php | Under investigation | n/a |
| Red Hat Software Collections | rh-php56-php | Will not fix | n/a |
| Red Hat Software Collections | rh-ruby22-ruby | Will not fix | n/a |
| Red Hat Software Collections | rh-ruby23-ruby | Will not fix | n/a |
| Red Hat Software Collections | rh-ruby24-ruby | Will not fix | n/a |
| Red Hat Subscription Asset Manager | ruby193-ruby | Under investigation | n/a |
No package ranges for this CVE.
Remediation
No remediation recorded yet.
Metrics
No CVSS v4.0 score for this CVE.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
AV:N/AC:L/Au:N/C:P/I:P/A:P
This CVE is not in the KEV list.
No CISA SSVC assessment for this CVE yet.
Estimated probability of exploitation in the wild in the next 30 days (FIRST EPSS). As of Oct 1, 2026.
Score over time
2021–2026- EPSS v1
- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Percentile over time
- EPSS v1
- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Table of values (19 key points)
Flat stretches are collapsed; showing up to 120 newest points.
| Date | Score | Percentile | Model |
|---|---|---|---|
| Oct 1, 2026 | 6.26% (0.06265) | 93.36th | v5 (v2026.06.15) |
| Jun 15, 2026 | 6.26% (0.06265) | 92.64th | v5 (v2026.06.15) |
| Nov 21, 2025 | 0.48% (0.00482) | 64.35th | v4 (v2025.03.14) |
| Nov 18, 2025 | 2.92% (0.02919) | 85.14th | v4 (v2025.03.14) |
| Mar 30, 2025 | 0.46% (0.00455) | 60.97th | v4 (v2025.03.14) |
| Mar 29, 2025 | 2.74% (0.02743) | 76.62th | v4 (v2025.03.14) |
| Jul 20, 2024 | 0.34% (0.00338) | 71.63th | v3 (v2023.03.01) |
| Feb 8, 2024 | 0.34% (0.00338) | 70.54th | v3 (v2023.03.01) |
| May 8, 2023 | 0.34% (0.00338) | 66.94th | v3 (v2023.03.01) |
| Mar 9, 2023 | 0.22% (0.00220) | 58.13th | v3 (v2023.03.01) |
| Mar 7, 2023 | 0.40% (0.00399) | 69.46th | v3 (v2023.03.01) |
| Mar 6, 2023 | 1.02% (0.01018) | 40.69th | v2 (v2022.01.01) |
| Sep 10, 2022 | 1.02% (0.01018) | 38.88th | v2 (v2022.01.01) |
| Apr 1, 2022 | 1.02% (0.01018) | 36.86th | v2 (v2022.01.01) |
| Feb 4, 2022 | 1.02% (0.01018) | 19.50th | v2 (v2022.01.01) |
| Feb 3, 2022 | 1.04% (0.01040) | 28.32th | v1 |
| Jan 6, 2022 | 1.04% (0.01040) | 27.69th | v1 |
| Sep 1, 2021 | 1.04% (0.01040) | 64.49th | v1 |
| Apr 14, 2021 | 1.04% (0.01040) | 0.00th | v1 |
References (8)
- http://www.securityfocus.com/bid/100538 vdb-entryx_refsource_BIDThird Party AdvisoryVDB Entry
- https://access.redhat.com/errata/RHSA-2018:1296 vendor-advisoryx_refsource_REDHATThird Party Advisory
- https://access.redhat.com/security/cve/CVE-2017-9227 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=1466739 Issue Tracking
- https://github.com/kkos/oniguruma/commit/9690d3ab1f9bcd2db8cbe1fe3ee4a5da606b8814 x_refsource_CONFIRMPatchThird Party Advisory
- https://github.com/kkos/oniguruma/issues/58 x_refsource_CONFIRMExploitIssue TrackingPatchThird Party Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2017-9227
- https://www.cve.org/CVERecord?id=CVE-2017-9227
| Link | Providers | Tags |
|---|---|---|
| http://www.securityfocus.com/bid/100538 | vdb-entryx_refsource_BIDThird Party AdvisoryVDB Entry | |
| https://access.redhat.com/errata/RHSA-2018:1296 | vendor-advisoryx_refsource_REDHATThird Party Advisory | |
| https://access.redhat.com/security/cve/CVE-2017-9227 | Vendor Advisory | |
| https://bugzilla.redhat.com/show_bug.cgi?id=1466739 | Issue Tracking | |
| https://github.com/kkos/oniguruma/commit/9690d3ab1f9bcd2db8cbe1fe3ee4a5da606b8814 | x_refsource_CONFIRMPatchThird Party Advisory | |
| https://github.com/kkos/oniguruma/issues/58 | x_refsource_CONFIRMExploitIssue TrackingPatchThird Party Advisory | |
| https://nvd.nist.gov/vuln/detail/CVE-2017-9227 | ||
| https://www.cve.org/CVERecord?id=CVE-2017-9227 |
Change history (0)
No recorded changes yet.