CVE-2017-9227

Source
https://nvd.nist.gov/vuln/detail/CVE-2017-9227
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2017-9227.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2017-9227
Downstream
Related
Published
2017-05-24T15:29:00Z
Modified
2025-10-27T13:00:29.095203Z
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

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

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

Git / github.com/php/php-src

Affected ranges

Type
GIT
Repo
https://github.com/php/php-src
Events