CVE-2017-9225

Source
https://cve.org/CVERecord?id=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
2026-03-14T09:27:25.678293Z
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
Last affected
Fixed
Database specific
{
    "versions": [
        {
            "introduced": "0"
        },
        {
            "last_affected": "6.2.0"
        }
    ]
}
Type
GIT
Repo
https://github.com/php/php-src
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
Database specific
{
    "versions": [
        {
            "introduced": "0"
        },
        {
            "last_affected": "7.1.5"
        }
    ]
}
Type
GIT
Repo
https://github.com/ruby/ruby
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
Database specific
{
    "versions": [
        {
            "introduced": "0"
        },
        {
            "last_affected": "2.4.1"
        }
    ]
}

Affected versions

Other
NEWS
NEWS-cvs2svn
POST_64BIT_BRANCH_MERGE
POST_AST_MERGE
POST_NATIVE_TLS_MERGE
POST_PHP7_EREG_MYSQL_REMOVALS
POST_PHP7_NSAPI_REMOVAL
POST_PHP7_REMOVALS
POST_PHPNG_MERGE
PRE_64BIT_BRANCH_MERGE
PRE_AST_MERGE
PRE_NATIVE_TLS_MERGE
PRE_PHP7_EREG_MYSQL_REMOVALS
PRE_PHP7_NSAPI_REMOVAL
PRE_PHP7_REMOVALS
PRE_PHPNG_MERGE
php-5.*
php-5.3.23RC1
php-5.3.29
php-5.3.29RC1
php-5.4.30RC1
php-5.4.32RC1
php-5.4.4RC2
php-5.5.24RC1
php-5.6.18RC1
php-5.6.19RC1
php-5.6.22RC1
php-5.6.23RC1
php-5.6.24RC1
php-7.*
php-7.0.11RC1
php-7.0.12RC1
php-7.0.13RC1
php-7.0.3RC1
php-7.0.4RC1
php-7.0.5RC1
php-7.0.7RC1
php-7.0.8RC1
php-7.0.9RC1
php-7.1.0alpha2
php-7.1.5
php-7.1.5RC1
v5.*
v5.9.6
v6.*
v6.0.0
v6.1.0
v6.1.1
v6.1.2
v6.1.3

Database specific

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