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 write in onigencunicodegetcasefoldcodesbystr() occurs during regular expression compilation. Code point 0xFFFFFFFF is not properly handled in unicodeunfoldkey(). A malformed regular expression could result in 4 bytes being written off the end of a stack buffer of expandcasefoldstring() during the call to onigencunicodegetcasefoldcodesby_str(), a typical stack buffer overflow.
{
"source": [
"CPE_STRING",
"REFERENCES"
],
"cpe": "cpe:2.3:a:oniguruma_project:oniguruma:6.2.0:*:*:*:*:*:*:*",
"extracted_events": [
{
"introduced": "6.2.0"
},
{
"last_affected": "6.2.0"
}
]
}
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2017-9225.json"
[
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"324108389711674846455372721615815071752",
"78125804542342940617720207021732851899",
"288314762901706662148070349691664859187",
"194786076425880166381460759605312479128"
]
},
"target": {
"file": "src/unicode_unfold_key.c"
},
"source": "https://github.com/kkos/oniguruma/commit/166a6c3999bf06b4de0ab4ce6b088a468cc4029f",
"signature_version": "v1",
"id": "CVE-2017-9225-3fa17e87",
"deprecated": false
},
{
"signature_type": "Function",
"digest": {
"function_hash": "178544139292996599899959759183935258796",
"length": 37595.0
},
"target": {
"function": "unicode_unfold_key",
"file": "src/unicode_unfold_key.c"
},
"source": "https://github.com/kkos/oniguruma/commit/166a6c3999bf06b4de0ab4ce6b088a468cc4029f",
"signature_version": "v1",
"id": "CVE-2017-9225-5da41359",
"deprecated": false
}
]
"2026-08-07T14:59:23Z"
{
"source": "CPE_RANGE",
"cpe": "cpe:2.3:a:php:php:*:*:*:*:*:oniguruma-mod:*:*",
"extracted_events": [
{
"introduced": "0"
},
{
"last_affected": "7.1.5"
}
]
}
{
"source": "CPE_RANGE",
"cpe": "cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:oniguruma-mod:*:*",
"extracted_events": [
{
"introduced": "0"
},
{
"last_affected": "2.4.1"
}
]
}