Critical Denial-of-Service Vulnerability in PHP5 due to Oniguruma Library Flaw

php5 Updated 02 Oct 2025

Summary

24/05/2017
N/A
Yes i
High
7.5

ALPINE-CVE-2017-9229: 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. Affects php5 versions < 5.6.31-r0. Fixed in 5.6.31-r0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

PHP5 is a widely-used open-source scripting language designed for web development but also used as a general-purpose programming language. It is known for its ease of use, flexibility, and extensive community support. However, PHP5 has been found to be vulnerable to a critical issue stemming from the Oniguruma library, which is responsible for regular expression handling. This vulnerability can lead to severe service disruptions, making it crucial for users to address it promptly.

Vulnerability Detail

An issue was discovered in Oniguruma 6.2.0, which is utilized in PHP5. The vulnerability arises during regular expression compilation in the left_adjust_char_head() function, leading to a SIGSEGV (segmentation fault). This flaw in the handling of reg->dmax in the forward_search_range() function can result in an invalid pointer dereference, causing an immediate denial-of-service condition. The vulnerability affects PHP5 versions prior to 5.6.31-r0, making it imperative for users to update their installations to mitigate potential risks.

How To Fix

Minimum fixed version

5.6.31-r0

This is the first release that contains the fix.

sudo apk add --upgrade php5

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can avoid using regular expressions that may trigger this vulnerability until the package is updated. However, this is not a permanent solution and should only be considered until the patch is applied.

Conclusion

The vulnerability in PHP5 due to the Oniguruma library poses a significant risk of denial-of-service attacks. Users are strongly advised to update their PHP5 installations to the patched version 5.6.31-r0 to mitigate this risk. Regular monitoring for vulnerabilities using tools like Vulert can help maintain the security of your applications.

See every vulnerability recorded for php5 →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 7.5, indicating a high severity level.

PHP5 versions prior to 5.6.31-r0 are affected by this vulnerability.

The vulnerability can lead to a denial-of-service condition, causing the affected application to crash and become unavailable.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

Yes, Vulert can monitor and alert you in real-time for open-source vulnerabilities using just a manifest file like package-lock.json.

Related vulnerabilities

Recent vulnerabilities recorded for php5.

How To Fix

Minimum fixed version

5.6.31-r0

This is the first release that contains the fix.

sudo apk add --upgrade php5

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback