CVE-2016-3191

The compile_branch function in pcre_compile.c in PCRE 8.x before 8.39 and pcre2_compile.c in PCRE2 before 10.22 mishandles patterns containing an (*ACCEPT)โ€ฆ

published March 17, 2016

CVSS
โ€”
EPSS
8%
Percentile
95.0
In the wild
Unconfirmed
What it is

โš ๏ธ A crafty regular expression can lead to a stack-based overflow! The compile_branch function in PCRE mishandles certain patterns, making it a potential playground for attackers. ๐Ÿ”ฅ Think of it like a recipe that accidentally allows too much of an ingredient, causing the whole dish to overflow โ€” when nested parentheses mix with the (*ACCEPT) substring in PCRE, it's the unexpected ingredient that can spoil the batch! An attacker could exploit this flaw to execute arbitrary code or create a denial of service, causing your system to crash spectacularly. Imagine your application going down just because a malicious regex was thrown its way โ€” absolutely devastating!

Put simply

Think of it like a recipe that accidentally allows too much of an ingredient, causing the whole dish to overflow โ€” when nested parentheses mix with the (*ACCEPT) substring in PCRE, it's the unexpected ingredient that can spoil the batch! The vulnerability in PCRE arises from how it processes specific regular expression patterns, particularly when they involve the (*ACCEPT) substring and nested parentheses. This mishandling can lead to buffer overflows, allowing for arbitrary code execution or a denial of service.

What to do

An attacker could exploit this flaw to execute arbitrary code or create a denial of service, causing your system to crash spectacularly. Imagine your application going down just because a malicious regex was thrown its way โ€” absolutely devastating! To secure your systems, update to PCRE version 8.39 or higher, or PCRE2 version 10.22 or higher immediately. Regularly audit your regex patterns to avoid unexpected behavior and ensure your applications are safeguarded against malformed inputs. You've got this! Implement these fixes and you'll turn this vulnerability into a thing of the past. ๐Ÿ›ก๏ธ

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.08430 ยท 95.0th percentile
Published
2016-03-17T23:00Z
EPSS history
Timeline
  • 17 MAR 23:00Z
    The compile_branch function in pcre_compile.c in PCRE 8.x before 8.39 and pcre2_compile.c in PCRE2 before 10.22 mishandles patterns containing an (*ACCEPT)โ€ฆ
    cvelistv5