CVE-2017-9226

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

published May 24, 2017

CVSS
—
EPSS
8%
Percentile
94.4
In the wild
Unconfirmed
What it is

⚠️ An unexpected twist in regular expressions can lead to heap memory chaos! This vulnerability in Oniguruma has a sneaky way of causing out-of-bounds writes due to mishandled octal numbers. 🚨 Think of it like a recipe that accidentally calls for an ingredient that’s way too abundant. Just as adding too much salt can ruin a dish, an oversized octal number can lead to a memory overflow when processing regex patterns. An attacker could exploit this vulnerability to corrupt memory, potentially leading to crashes or unpredictable behavior in applications. While this isn't actively exploited, the implications could be serious if it were, making it crucial to address.

Put simply

Think of it like a recipe that accidentally calls for an ingredient that’s way too abundant. Just as adding too much salt can ruin a dish, an oversized octal number can lead to a memory overflow when processing regex patterns. This vulnerability arises from how Oniguruma handles octal numbers in regular expressions, specifically in the functions fetch_token() and fetch_token_in_cc(). When an octal number exceeds the limit, it can cause next_state_val() to write outside the intended memory bounds, leading to memory corruption.

What to do

An attacker could exploit this vulnerability to corrupt memory, potentially leading to crashes or unpredictable behavior in applications. While this isn't actively exploited, the implications could be serious if it were, making it crucial to address. Update to the latest version of Oniguruma to close this loophole, ensuring your applications using Ruby and PHP are not left vulnerable. Review your regex patterns to avoid risky octal values that could trigger this issue. You've got this! With a few quick updates, you'll be on your way to a more secure environment! 🛡️

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.07511 · 94.4th percentile
Published
2017-05-24T15:00Z
EPSS history
Timeline
  • 24 MAY 15:00Z
    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
    cvelistv5