CVE-2017-9226 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 regul...
CriticalCVSS 9.8
EPSS 7.5%
- Published
- Updated
- Exploit status
- No public exploit known
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
| Product | Affected versions | Fixed in |
|---|---|---|
| debian/libonig(Debian:12) | < 6.1.3-2 | 6.1.3-2 |
| debian/libonig(Debian:13) | < 6.1.3-2 | 6.1.3-2 |
| debian/libonig(Debian:14) | < 6.1.3-2 | 6.1.3-2 |
| oniguruma project oniguruma | = 6.2.0 | No fix listed |
| PHP | < 5.6.31 | 5.6.31 |
| PHP | >= 7.0.0, < 7.0.21 | 7.0.21 |
| PHP | >= 7.1.0, < 7.1.7 | 7.1.7 |
| alpine/php5(Alpine:v3.4) | < 5.6.31-r0 | 5.6.31-r0 |
| alpine/php5(Alpine:v3.5) | < 5.6.31-r0 | 5.6.31-r0 |
| alpine/php5(Alpine:v3.6) | < 5.6.31-r0 | 5.6.31-r0 |
| alpine/php5(Alpine:v3.7) | < 5.6.31-r0 | 5.6.31-r0 |
| alpine/php5(Alpine:v3.8) | < 5.6.31-r0 | 5.6.31-r0 |
| alpine/php7(Alpine:v3.5) | < 7.0.21-r0 | 7.0.21-r0 |
| alpine/php7(Alpine:v3.6) | < 7.1.9-r0 | 7.1.9-r0 |
| alpine/php7(Alpine:v3.7) | < 7.1.7-r0 | 7.1.7-r0 |
References
- Debian Security Tracker CVE-2017-9226 vendor-advisory
- 101244 third-party-advisory vdb-entry
- RHSA-2018:1296 third-party-advisory vendor-advisory
- github.com patch third-party-advisory
- github.com patch third-party-advisory
- github.com exploit issue-tracking third-party-advisory
- security.alpinelinux.org vendor-advisory
- bugs.debian.org issue-tracking