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.
{
"unresolved_ranges": [
{
"cpes": [
"cpe:2.3:a:php:php:*:*:*:*:*:*:*:*"
],
"extracted_events": [
{
"range": [
{
"introduced": "5.6.0"
},
{
"fixed": "5.6.31"
},
{
"introduced": "7.0.0"
},
{
"fixed": "7.0.21"
},
{
"introduced": "7.1.0"
},
{
"fixed": "7.1.7"
}
],
"source": "CPE_RANGE"
}
],
"vendor_product": "php:php"
}
]
}{
"extracted_events": [
{
"cpe": "cpe:2.3:a:oniguruma_project:oniguruma:6.2.0:*:*:*:*:*:*:*",
"range": [
{
"introduced": "6.2.0"
},
{
"last_affected": "6.2.0"
}
],
"source": "CPE_STRING"
},
{
"range": [
{
"fixed": "3b63d12038c8d8fc278e81c942fa9bec7c704c8b"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2017-9228.json"
[
{
"deprecated": false,
"digest": {
"line_hashes": [
"137584815735396322363988031431915161481",
"333494754384487831514448708681268998912",
"146133796272021099976876320362250733552",
"333557439717205834644043090230902438066"
],
"threshold": 0.9
},
"id": "CVE-2017-9228-76affd58",
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/kkos/oniguruma/commit/3b63d12038c8d8fc278e81c942fa9bec7c704c8b",
"target": {
"file": "src/regparse.c"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "101840422994517572473954624738540707486",
"length": 523
},
"id": "CVE-2017-9228-f4e5b971",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/kkos/oniguruma/commit/3b63d12038c8d8fc278e81c942fa9bec7c704c8b",
"target": {
"file": "src/regparse.c",
"function": "next_state_class"
}
}
]
"2026-10-22T07:18:50Z"