#VU38946 Out-of-bounds write in Oniguruma


Published: 2017-05-24 | Updated: 2020-08-08

Vulnerability identifier: #VU38946

Vulnerability risk: High

CVSSv3.1: 8.5 [CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C]

CVE-ID: CVE-2017-9225

CWE-ID: CWE-787

Exploitation vector: Network

Exploit availability: No

Vulnerable software:
Oniguruma
Universal components / Libraries / Libraries used by multiple products

Vendor: K.Kosako

Description

The vulnerability allows a remote non-authenticated attacker to execute arbitrary code.

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.

Mitigation
Install update from vendor's website.

Vulnerable software versions

Oniguruma: 6.2.0


External links
http://github.com/kkos/oniguruma/commit/166a6c3999bf06b4de0ab4ce6b088a468cc4029f
http://github.com/kkos/oniguruma/issues/56


Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability.


Latest bulletins with this vulnerability