CVE-2017-9225

Source
https://nvd.nist.gov/vuln/detail/CVE-2017-9225
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2017-9225.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2017-9225
Downstream
Published
2017-05-24T15:29:00.230Z
Modified
2025-12-06T21:04:08.160353Z
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

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

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