PHPApplication

CVE-2017-9225

CRITICAL · 9.8 CVSS v3.0 Published 2017-05-24
Fix available
A fix is available. Upgrade to after 7.1.5 or later.
See remediation →
100/100
Remediation priority · Urgent
Public exploit Remotely reachable No privileges Zero-click Patch available

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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 onigenc_unicode_get_case_fold_codes_by_str() occurs during regular expression compilation. Code point 0xFFFFFFFF is not properly handled in unicode_unfold_key(). A malformed regular expression could result in 4 bytes being written off the end of a stack buffer of expand_case_fold_string() during the call to onigenc_unicode_get_case_fold_codes_by_str(), a typical stack buffer overflow.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis
How this class of weakness works · CWE-787

The program writes past the bounds of a buffer, overwriting adjacent memory an attacker can turn to their advantage. Crafted input can overwrite control data and redirect execution. Remediation is validating every index and length before a write, plus modern memory-safety mitigations.

General guidance for the out-of-bounds write class — the official description and references above are authoritative for this specific CVE. Want a bespoke review and a reviewed fix? Ask our team →

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
PHPApplication
Affected:<= 7.1.5
RubyApplication
Affected:<= 2.4.1
OnigurumaApplication
Affected:= 6.2.0

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to a release after 7.1.5
Vendor patch github.com →
Recommended fix High confidence

PHP 7.1.6+ or PHP 7.2+/7.3+ | Ruby 2.4.2+ | Oniguruma 6.2.1+

  1. 1. Identify which product uses the vulnerable Oniguruma library: PHP with mbstring (version <= 7.1.5), Ruby with Oniguruma-mod (version <= 2.4.1), or the Oniguruma library itself (version 6.2.0).
  2. 2. For PHP: Upgrade PHP from any version <= 7.1.5 to PHP 7.1.6 or later (7.2.x or 7.3.x recommended for additional security fixes).
  3. 3. For Ruby: Upgrade Ruby from any version <= 2.4.1 to Ruby 2.4.2 or later (2.5.x or later recommended).
  4. 4. For Oniguruma directly: Upgrade from version 6.2.0 to version 6.2.1 or later, which contains the fix at github.com/kkos/oniguruma/commit/166a6c3999bf06b4de0ab4ce6b088a468cc4029f.
  5. 5. After upgrade, verify the Oniguruma version is no longer 6.2.0 by checking phpinfo() for PHP or running 'ruby -v' and confirming the underlying Oniguruma version.
  6. 6. Test critical regex-dependent functionality to ensure the upgrade does not break existing patterns.
Caveat Major version jumps (e.g., PHP 7.1 to 7.4 or Ruby 2.4 to 3.x) may introduce breaking changes in other functionality; test thoroughly before production deployment

Generated from the published advisory — verify against the referenced sources before acting.

We can identify the exact fixed release, upgrade, and verify it in staging — typical engagement from $3,550. Get the upgrade done

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2017-9225 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2017-9225 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data