CVE-2017-9227

Source
https://nvd.nist.gov/vuln/detail/CVE-2017-9227
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2017-9227.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2017-9227
Downstream
Related
Published
2017-05-24T15:29:00Z
Modified
2025-10-14T16:15:56.333901Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/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 read occurs in mbcenclen() during regular expression searching. Invalid handling of reg->dmin in forwardsearchrange() could result in an invalid pointer dereference, as an out-of-bounds read from a stack buffer.

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
Type
GIT
Repo
https://github.com/php/php-src
Events

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": [
        {
            "id": "CVE-2017-9227-87db20c4",
            "signature_type": "Function",
            "target": {
                "file": "src/regexec.c",
                "function": "forward_search_range"
            },
            "signature_version": "v1",
            "digest": {
                "length": 3055.0,
                "function_hash": "107256506076362528630293821856860722664"
            },
            "deprecated": false,
            "source": "https://github.com/kkos/oniguruma/commit/9690d3ab1f9bcd2db8cbe1fe3ee4a5da606b8814"
        },
        {
            "id": "CVE-2017-9227-ce1115bb",
            "signature_type": "Line",
            "target": {
                "file": "src/regexec.c"
            },
            "signature_version": "v1",
            "digest": {
                "line_hashes": [
                    "244917375269462939977115246385469839147",
                    "260813193810532824259245784304712775384",
                    "120231572746728307893137213880243448934",
                    "118234623326047463135166462558158684412"
                ],
                "threshold": 0.9
            },
            "deprecated": false,
            "source": "https://github.com/kkos/oniguruma/commit/9690d3ab1f9bcd2db8cbe1fe3ee4a5da606b8814"
        }
    ]
}