CVE-2016-3191
Apache PCRE Remote Code Execution Buffer Overflow
Description
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.
INFO
Published Date :
March 17, 2016, 11:59 p.m.
Last Modified :
April 12, 2025, 10:46 a.m.
Remotely Exploit :
Yes !
Source :
[email protected]
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source | 
|---|---|---|---|---|---|---|
| CVSS 2.0 | HIGH | [email protected] | ||||
| CVSS 3.0 | CRITICAL | [email protected] | 
Solution
- Update the affected PCRE packages to resolve the vulnerability.
- Update affected PCRE2 packages.
- For SUSE systems, use YaST online_update or zypper patch to apply the security updates.
- For RHEL systems, update the affected packages based on the relevant RHSA guidance.
Public PoC/Exploit Available at Github
                                            CVE-2016-3191 has a 7 public
                                            PoC/Exploit available at Github.
                                            Go to the Public Exploits tab to see the list.
                                        
References to Advisories, Solutions, and Tools
                                            Here, you will find a curated list of external links that provide in-depth
                                            information, practical solutions, and valuable tools related to
                                            CVE-2016-3191.
                                        
CWE - Common Weakness Enumeration
            While CVE identifies
            specific instances of vulnerabilities, CWE categorizes the common flaws or
            weaknesses that can lead to vulnerabilities. CVE-2016-3191 is
            associated with the following CWEs:
        
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
            (CAPEC)
            stores attack patterns, which are descriptions of the common attributes and
            approaches employed by adversaries to exploit the CVE-2016-3191
            weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Map Vulnerabilities into Different Layers of the Container Image
Python
None
Go Dockerfile JavaScript HTML CSS HCL
Helm chart for MarkLogic Server
Smarty Makefile Go Mustache Shell
None
Dockerfile Makefile Shell Go Smarty Open Policy Agent Mustache
None
Dockerfile Makefile
None
Dockerfile Makefile Shell Go Smarty Open Policy Agent
None
Python
Results are limited to the first 15 repositories due to potential performance issues.
			The following list is the news that have been mention
			CVE-2016-3191 vulnerability anywhere in the article.
		
                The following table lists the changes that have been made to the
                CVE-2016-3191 vulnerability over time.
            
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
- 
                            CVE Modified by af854a3a-2127-422b-91ae-364da2661108Nov. 21, 2024 Action Type Old Value New Value Added Reference http://rhn.redhat.com/errata/RHSA-2016-1025.html Added Reference http://vcs.pcre.org/pcre?view=revision&revision=1631 Added Reference http://vcs.pcre.org/pcre2?view=revision&revision=489 Added Reference http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html Added Reference http://www.securityfocus.com/bid/84810 Added Reference http://www-01.ibm.com/support/docview.wss?uid=isg3T1023886 Added Reference https://access.redhat.com/errata/RHSA-2016:1132 Added Reference https://bto.bluecoat.com/security-advisory/sa128 Added Reference https://bugs.debian.org/815920 Added Reference https://bugs.debian.org/815921 Added Reference https://bugs.exim.org/show_bug.cgi?id=1791 Added Reference https://bugzilla.redhat.com/show_bug.cgi?id=1311503 Added Reference https://www.tenable.com/security/tns-2016-18 
- 
                            CVE Modified by [email protected]May. 14, 2024 Action Type Old Value New Value 
- 
                            CVE Modified by [email protected]Jan. 05, 2018 Action Type Old Value New Value Added Reference https://access.redhat.com/errata/RHSA-2016:1132 [No Types Assigned] Added Reference http://rhn.redhat.com/errata/RHSA-2016-1025.html [No Types Assigned] 
- 
                            CVE Modified by [email protected]Mar. 01, 2017 Action Type Old Value New Value Added Reference https://www.tenable.com/security/tns-2016-18 [No Types Assigned] 
- 
                            CVE Modified by [email protected]Dec. 28, 2016 Action Type Old Value New Value Added Reference https://bto.bluecoat.com/security-advisory/sa128 [No Types Assigned] 
- 
                            CVE Modified by [email protected]Dec. 15, 2016 Action Type Old Value New Value Added Reference http://www-01.ibm.com/support/docview.wss?uid=isg3T1023886 [No Types Assigned] 
- 
                            CVE Modified by [email protected]Nov. 28, 2016 Action Type Old Value New Value Added Reference http://www.securityfocus.com/bid/84810 [No Types Assigned] 
- 
                            CVE Modified by [email protected]Oct. 04, 2016 Action Type Old Value New Value Added Reference http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html 
- 
                            Modified Analysis by [email protected]Mar. 21, 2016 Action Type Old Value New Value Added CPE Configuration Configuration 1 OR *cpe:2.3:a:pcre:pcre:8.38:*:*:*:*:*:*:* *cpe:2.3:a:pcre:pcre:8.37:*:*:*:*:*:*:* *cpe:2.3:a:pcre:pcre:8.36:*:*:*:*:*:*:* *cpe:2.3:a:pcre:pcre:8.35:*:*:*:*:*:*:* *cpe:2.3:a:pcre:pcre:8.34:*:*:*:*:*:*:* *cpe:2.3:a:pcre:pcre:8.33:*:*:*:*:*:*:* *cpe:2.3:a:pcre:pcre:8.32:*:*:*:*:*:*:* *cpe:2.3:a:pcre:pcre:8.31:*:*:*:*:*:*:* *cpe:2.3:a:pcre:pcre:8.30:*:*:*:*:*:*:* *cpe:2.3:a:pcre:pcre:8.21:*:*:*:*:*:*:* *cpe:2.3:a:pcre:pcre:8.20:*:*:*:*:*:*:* *cpe:2.3:a:pcre:pcre:8.13:*:*:*:*:*:*:* *cpe:2.3:a:pcre:pcre:8.12:*:*:*:*:*:*:* *cpe:2.3:a:pcre:pcre:8.11:*:*:*:*:*:*:* *cpe:2.3:a:pcre:pcre:8.10:*:*:*:*:*:*:* *cpe:2.3:a:pcre:pcre:8.02:*:*:*:*:*:*:* *cpe:2.3:a:pcre:pcre:8.01:*:*:*:*:*:*:* *cpe:2.3:a:pcre:pcre:8.00:*:*:*:*:*:*:* *cpe:2.3:a:pcre:pcre2:10.21:*:*:*:*:*:*:* (and previous) Added CVSS V2 (AV:N/AC:L/Au:N/C:P/I:P/A:P) Added CVSS V3 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H Changed Reference Type https://bugs.exim.org/show_bug.cgi?id=1791 No Types Assigned https://bugs.exim.org/show_bug.cgi?id=1791 Exploit Added CWE CWE-119 
- 
                            Initial Analysis by [email protected]Mar. 21, 2016 Action Type Old Value New Value 
Vulnerability Scoring Details
Base CVSS Score: 9.8
Base CVSS Score: 7.5
Exploit Prediction
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.
11.34 }} 5.05%
score
0.93293
percentile
 
                         
                         
                         
                                             
                                            