oniguruma: Heap buffer overflow in next_state_val() during regular expression compilation
Published May 24, 2017
9.8
CRITICALCVSS 3.1
EPSS 7.51%
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.
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 Container Platform 4
oniguruma
Will not fix
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 Container Platform 4 | oniguruma | Will not fix | 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:L/A:L
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 | 7.51% (0.07511) | 94.31th | v5 (v2026.06.15) |
| Jun 15, 2026 | 7.51% (0.07511) | 93.69th | v5 (v2026.06.15) |
| Nov 21, 2025 | 0.96% (0.00963) | 75.83th | v4 (v2025.03.14) |
| Nov 18, 2025 | 3.29% (0.03294) | 85.98th | v4 (v2025.03.14) |
| Mar 30, 2025 | 0.73% (0.00733) | 70.44th | v4 (v2025.03.14) |
| Mar 29, 2025 | 3.24% (0.03241) | 78.33th | v4 (v2025.03.14) |
| Jul 20, 2024 | 0.52% (0.00515) | 76.91th | v3 (v2023.03.01) |
| Feb 8, 2024 | 0.52% (0.00515) | 76.01th | v3 (v2023.03.01) |
| May 8, 2023 | 0.52% (0.00515) | 73.22th | v3 (v2023.03.01) |
| Mar 9, 2023 | 0.34% (0.00336) | 66.67th | v3 (v2023.03.01) |
| Mar 7, 2023 | 0.48% (0.00477) | 71.97th | 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.02% (0.01020) | 27.25th | v1 |
| Jan 6, 2022 | 1.02% (0.01020) | 26.63th | v1 |
| Sep 1, 2021 | 1.02% (0.01020) | 61.88th | v1 |
| Apr 14, 2021 | 1.02% (0.01020) | 0.00th | v1 |
References (9)
- http://www.securityfocus.com/bid/101244 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-9226 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=1466736 Issue Tracking
- https://github.com/kkos/oniguruma/commit/b4bf968ad52afe14e60a2dc8a95d3555c543353a x_refsource_CONFIRMPatchThird Party Advisory
- https://github.com/kkos/oniguruma/commit/f015fbdd95f76438cd86366467bb2b39870dd7c6 x_refsource_CONFIRMPatchThird Party Advisory
- https://github.com/kkos/oniguruma/issues/55 x_refsource_CONFIRMExploitIssue TrackingThird Party Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2017-9226
- https://www.cve.org/CVERecord?id=CVE-2017-9226
| Link | Providers | Tags |
|---|---|---|
| http://www.securityfocus.com/bid/101244 | 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-9226 | Vendor Advisory | |
| https://bugzilla.redhat.com/show_bug.cgi?id=1466736 | Issue Tracking | |
| https://github.com/kkos/oniguruma/commit/b4bf968ad52afe14e60a2dc8a95d3555c543353a | x_refsource_CONFIRMPatchThird Party Advisory | |
| https://github.com/kkos/oniguruma/commit/f015fbdd95f76438cd86366467bb2b39870dd7c6 | x_refsource_CONFIRMPatchThird Party Advisory | |
| https://github.com/kkos/oniguruma/issues/55 | x_refsource_CONFIRMExploitIssue TrackingThird Party Advisory | |
| https://nvd.nist.gov/vuln/detail/CVE-2017-9226 | ||
| https://www.cve.org/CVERecord?id=CVE-2017-9226 |
Change history (0)
No recorded changes yet.