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.
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.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 3 | rh-php70-php +29 | 7.0.27-1.el6 | RHSA-2018:1296 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 11 SP4 | php53 | 5.3.17-108.1 | SUSE-SU-2017:1585-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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.5 | ALAS2-2024-2520 |
Advisories 9
- RHSA-2018:1296 Red Hat Security Advisory: rh-php70-php security, bug fix, and enhancement update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- USN-3382-1 php5, php7.0 vulnerabilities Ubuntu Security Notices (USN) · Apr 22, 2026
- DLA-958-1 libonig - security update Debian Security (DSA / DLA) · Mar 9, 2026
- SUSE-SU-2017:1585-1 Security update for php53 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2017:1662-1 Security update for php5 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2017:1717-1 Security update for php7 SUSE / openSUSE Security Updates · May 2, 2025
- WID-SEC-2023-2719 PHP: Mehrere Schwachstellen BSI CERT-Bund (WID) · Apr 16, 2025
- ALAS2-2024-2520 Important: php security update (Amazon Linux 2) Amazon Linux Security Center (ALAS) · Apr 15, 2024
- ALAS2-2023-2311 Important: oniguruma security update (Amazon Linux 2) Amazon Linux Security Center (ALAS) · Oct 19, 2023