CVE-2017-9226 Memory corruption in n/a
Heap out-of-bounds write in Oniguruma regex compilation allows attackers to execute arbitrary code or cause denial of service via malformed octal sequences.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2017-9226?
CVE-2017-9226 is a critical memory corruption vulnerability in Php Php, published on 24 May 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
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 heap out-of-bounds write or read occurs in next_state_val() during regular expression compilation. Octal numbers larger than 0xff are not handled correctly in fetch_token() and fetch_token_in_cc(). A malformed regular expression containing an octal number in the form of '\700' would produce an invalid code point value larger than 0xff in next_state_val(), resulting in an out-of-bounds write memory corruption.
Weakness: CWE-787
Which versions are affected by CVE-2017-9226?
It affects 2 products.
Products include Oniguruma Project Oniguruma, Php Php.
How do I fix CVE-2017-9226?
Upgrade to a fixed version.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2017-9226 being exploited?
There is no known exploitation of CVE-2017-9226 in the wild and no public exploit code.
Other vulnerabilities in Php Php
Sources
Also known as ALPINE-CVE-2017-9226, CLSA-2025-1757666588, DEBIAN-CVE-2017-9226, GHSA-q5wh-hr49-c2mq, UBUNTU-CVE-2017-9226.