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.2
CVE-2016-3191 is a critical-severity flaw (CVSS 9.8) affecting pcre, pcre2. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
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) substring in conjunction with nested parentheses, which allows remote attackers to execute arbitrary code or cause a denial of service (stack-based buffer overflow) via a crafted regular expression, as demonstrated by a JavaScript RegExp object encountered by Konqueror, aka ZDI-CAN-3542.
Why this priority
- Critical severity
- EPSS top 5%: very likely to be exploited
- Public exploit reference
- Remotely exploitable, no login, no user action
- On your watchlist
A fixed release or distro patch exists.
Risk facts
| CVSS score | 9.8 (Critical) |
| Attack vector | Network (remote) |
| Attack complexity | Low |
| Privileges needed | None |
| User interaction | None |
| EPSS exploit chance | 8.4% (top 5%) |
| CISA exploited list | No |
| Weakness | CWE-119 |
| Published | 2016-03-17 |
| Last modified | 2026-06-17 |
Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Exact fixes by distribution
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2016-3191?
pcre: downgrade or apply the listed mitigation; pcre2: upgrade to newer than 10.21. Exact commands for each OS are on this page.
Is CVE-2016-3191 being exploited?
CVE-2016-3191 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2016-3191 affect?
CVE-2016-3191 affects pcre, pcre2. Severity is critical (CVSS 9.8). 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) substring in conjunction with nested parentheses, which allows remote attackers to e
How urgent is CVE-2016-3191?
Priority 73/100. Critical severity; EPSS top 5%: very likely to be exploited; Public exploit reference; Remotely exploitable, no login, no user action; On your watchlist
Related CVEs
- CVE-2019-20838 HIGH 7.5 UPGRADE UPGRADE libpcre in PCRE before 8.43 allows a subject buffer over-read in JIT when UTF is disabled, and \X or \R has mo
- CVE-2020-14155 MEDIUM 5.3 UPGRADE UPGRADE libpcre in PCRE before 8.44 allows an integer overflow via a large number after a (?C substring.
- CVE-2017-7246 HIGH 7.8 DOWNGRADE Stack-based buffer overflow in the pcre32_copy_substring function in pcre_get.c in libpcre1 in PCRE 8.40 allow
- CVE-2017-7245 HIGH 7.8 DOWNGRADE Stack-based buffer overflow in the pcre32_copy_substring function in pcre_get.c in libpcre1 in PCRE 8.40 allow
- CVE-2017-7244 MEDIUM 5.5 DOWNGRADE The _pcre32_xclass function in pcre_xclass.c in libpcre1 in PCRE 8.40 allows remote attackers to cause a denia