CVE-2017-9225

Source
https://nvd.nist.gov/vuln/detail/CVE-2017-9225
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2017-9225.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2017-9225
Downstream
Published
2017-05-24T15:29:00.230Z
Modified
2025-11-18T14:02:03.920278Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
[none]
Details

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.

References

Affected packages

Git / github.com/kkos/oniguruma

Affected ranges

Type
GIT
Repo
https://github.com/kkos/oniguruma
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

v5.*

v5.9.6

v6.*

v6.0.0
v6.1.0
v6.1.1
v6.1.2
v6.1.3

Database specific

vanir_signatures

[
    {
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "324108389711674846455372721615815071752",
                "78125804542342940617720207021732851899",
                "288314762901706662148070349691664859187",
                "194786076425880166381460759605312479128"
            ]
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2017-9225-3fa17e87",
        "target": {
            "file": "src/unicode_unfold_key.c"
        },
        "source": "https://github.com/kkos/oniguruma/commit/166a6c3999bf06b4de0ab4ce6b088a468cc4029f",
        "signature_type": "Line"
    },
    {
        "digest": {
            "function_hash": "178544139292996599899959759183935258796",
            "length": 37595.0
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2017-9225-5da41359",
        "target": {
            "file": "src/unicode_unfold_key.c",
            "function": "unicode_unfold_key"
        },
        "source": "https://github.com/kkos/oniguruma/commit/166a6c3999bf06b4de0ab4ce6b088a468cc4029f",
        "signature_type": "Function"
    }
]

Git / github.com/php/php-src

Affected ranges

Type
GIT
Repo
https://github.com/php/php-src
Events
Introduced
0 Unknown introduced commit / All previous commits are affected

Git / github.com/ruby/ruby

Affected ranges

Type
GIT
Repo
https://github.com/ruby/ruby
Events
Introduced
0 Unknown introduced commit / All previous commits are affected