Stack Exhaustion Vulnerability in libonig

libonig Updated 02 Oct 2025

Summary

09/09/2019
N/A
Yes i
High
7.5

CVE-2019-16163: Oniguruma before 6.9.3 allows Stack Exhaustion in regcomp.c because of recursion in regparse.c. Affects libonig across 2 version ranges.

< 6.9.4-1 < 4097828d7cc87589864fecf452f2cd46c5f37180

Fixed in 6.9.4-1. 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

libonig is an open-source library used for regular expression pattern matching. It is commonly used in various applications and programming languages. The library provides functions for compiling and executing regular expressions. However, a vulnerability has been discovered in versions before 6.9.3 that can lead to stack exhaustion.

Vulnerability Detail

The vulnerability, identified as CVE-2019-16163, originates from recursion in the regparse.c file of Oniguruma. This recursion can cause stack exhaustion in the regcomp.c file. An attacker can exploit this vulnerability to cause a denial-of-service (DoS) condition by providing a specially crafted regular expression pattern. The impact of this vulnerability can result in the affected application crashing or becoming unresponsive.

How To Fix

Minimum fixed version

6.9.4-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade libonig

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

Workaround

There is no known workaround for this vulnerability. It is essential to update the library to the fixed version.

Conclusion

The stack exhaustion vulnerability in libonig can be mitigated by updating the library to version 6.9.4-1 or later. It is crucial for developers to promptly apply the fix to ensure the security and stability of their applications. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for libonig →

Share this vulnerability

FAQ

libonig is an open-source library used for regular expression pattern matching.

The vulnerability can lead to stack exhaustion, causing a denial-of-service condition in the affected application.

An attacker can exploit this vulnerability by providing a specially crafted regular expression pattern.

Yes, updating the libonig library to version 6.9.4-1 or later fixes this vulnerability.

No, updating the library to the fixed version is the only solution.

Related vulnerabilities

Recent vulnerabilities recorded for libonig.

How To Fix

Minimum fixed version

6.9.4-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade libonig

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