CVE-2017-9228 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 occurs in bitset_set_range() during regular exp...
CriticalCVSS 9.8
EPSS 6.3%
- 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 occurs in bitset_set_range() during regular expression compilation due to an uninitialized variable from an incorrect state transition. An incorrect state transition in parse_char_class() could create an execution path that leaves a critical local variable uninitialized until it's used as an index, 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.0, < 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-9228 vendor-advisory
- RHSA-2018:1296 third-party-advisory vendor-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