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