CVE-2019-19012 in Onigurumainfo

Summary

by MITRE

An integer overflow in the search_in_range function in regexec.c in Oniguruma 6.x before 6.9.4_rc2 leads to an out-of-bounds read, in which the offset of this read is under the control of an attacker. (This only affects the 32-bit compiled version). Remote attackers can cause a denial-of-service or information disclosure, or possibly have unspecified other impact, via a crafted regular expression.

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Analysis

by VulDB Data Team • 10/17/2025

The vulnerability identified as CVE-2019-19012 represents a critical integer overflow flaw within the Oniguruma regular expression library version 6.x prior to 6.9.4_rc2. This issue specifically impacts the search_in_range function located in the regexec.c source file, creating a condition where an attacker-controlled offset can lead to out-of-bounds memory reads. The vulnerability is architecture-specific, affecting only 32-bit compiled versions of the library, which makes it particularly concerning for systems operating in resource-constrained environments or those with limited memory management capabilities.

The technical implementation of this vulnerability stems from improper handling of integer arithmetic within the regular expression parsing logic. When processing crafted regular expressions, the search_in_range function fails to properly validate or constrain integer values during range calculations, resulting in an integer overflow condition. This overflow causes the subsequent memory access operation to reference memory locations outside the intended bounds, with the offset value directly controlled by the attacker through malicious regular expression input. The vulnerability manifests as an out-of-bounds read operation, where the attacker can manipulate the memory access pattern to potentially extract sensitive information from adjacent memory regions.

The operational impact of this vulnerability extends beyond simple denial-of-service conditions to encompass potential information disclosure and unspecified other security implications. Remote attackers can leverage this vulnerability to cause system instability through denial-of-service attacks by crafting specific regular expressions that trigger the overflow condition. More critically, the out-of-bounds read could expose sensitive data from memory regions, potentially including stack contents, heap data, or other process memory that may contain authentication tokens, cryptographic keys, or other confidential information. The unspecified nature of additional impacts suggests this vulnerability could potentially enable more sophisticated exploitation techniques, though the primary concern remains the information disclosure and service disruption capabilities.

Mitigation strategies for CVE-2019-19012 should prioritize immediate patching of affected Oniguruma library versions to 6.9.4_rc2 or later, which contains the necessary fixes for the integer overflow condition. Organizations should implement input validation measures for all regular expression processing, including limiting the complexity and length of regular expressions accepted by applications using Oniguruma. Network segmentation and application-level firewalls can help reduce the attack surface by limiting exposure to potentially malicious regular expression inputs. Additionally, monitoring systems should be configured to detect unusual patterns in regular expression processing that might indicate exploitation attempts, and regular security assessments should verify that all instances of the vulnerable library have been properly updated across the organization's infrastructure.

This vulnerability aligns with CWE-190, which specifically addresses integer overflow conditions, and demonstrates characteristics consistent with ATT&CK technique T1059.007 for the use of regular expressions in command and scripting languages. The 32-bit architecture limitation places this vulnerability in a particularly dangerous category, as many legacy systems and embedded environments continue to operate with 32-bit binaries, making these systems more susceptible to exploitation. Security teams should prioritize assessment of their 32-bit system environments and ensure that all regular expression processing components have been updated to prevent potential exploitation.

Reservation

11/16/2019

Moderation

accepted

CPE

ready

EPSS

0.10539

KEV

no

Activities

very low

Sources

Do you know our Splunk app?

Download it now for free!