The compile_branch function in pcre_compile.c in PCRE 8.x before 8.39 and pcre2_compile.c…
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 16 fixed, 2 without a fix
Attack profile from CVSS 3.0 · NVD. Fix status from CNA and Red Hat. Impact type from CWE-119 and the CVSS impact.
Summary
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 it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | — | all versions | — | No fix listed | CNA |
- — Vendor— Affected all versions Fixed in — No fix listed CNA
CPE configurations NVD · 19
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:pcre:pcre:8.00:*:*:*:*:*:*:* | 8.00 | Vulnerable | PCRE |
| cpe:2.3:a:pcre:pcre:8.01:*:*:*:*:*:*:* | 8.01 | Vulnerable | PCRE |
| cpe:2.3:a:pcre:pcre:8.02:*:*:*:*:*:*:* | 8.02 | Vulnerable | PCRE |
| cpe:2.3:a:pcre:pcre:8.10:*:*:*:*:*:*:* | 8.10 | Vulnerable | PCRE |
| cpe:2.3:a:pcre:pcre:8.11:*:*:*:*:*:*:* | 8.11 | Vulnerable | PCRE |
| cpe:2.3:a:pcre:pcre:8.12:*:*:*:*:*:*:* | 8.12 | Vulnerable | PCRE |
| cpe:2.3:a:pcre:pcre:8.13:*:*:*:*:*:*:* | 8.13 | Vulnerable | PCRE |
| cpe:2.3:a:pcre:pcre:8.20:*:*:*:*:*:*:* | 8.20 | Vulnerable | PCRE |
| cpe:2.3:a:pcre:pcre:8.21:*:*:*:*:*:*:* | 8.21 | Vulnerable | PCRE |
| cpe:2.3:a:pcre:pcre:8.30:*:*:*:*:*:*:* | 8.30 | Vulnerable | PCRE |
- cpe:2.3:a:pcre:pcre:8.00:*:*:*:*:*:*:* Versions 8.00 Vulnerable ·PCRE
- cpe:2.3:a:pcre:pcre:8.01:*:*:*:*:*:*:* Versions 8.01 Vulnerable ·PCRE
- cpe:2.3:a:pcre:pcre:8.02:*:*:*:*:*:*:* Versions 8.02 Vulnerable ·PCRE
- cpe:2.3:a:pcre:pcre:8.10:*:*:*:*:*:*:* Versions 8.10 Vulnerable ·PCRE
- cpe:2.3:a:pcre:pcre:8.11:*:*:*:*:*:*:* Versions 8.11 Vulnerable ·PCRE
- cpe:2.3:a:pcre:pcre:8.12:*:*:*:*:*:*:* Versions 8.12 Vulnerable ·PCRE
- cpe:2.3:a:pcre:pcre:8.13:*:*:*:*:*:*:* Versions 8.13 Vulnerable ·PCRE
- cpe:2.3:a:pcre:pcre:8.20:*:*:*:*:*:*:* Versions 8.20 Vulnerable ·PCRE
- cpe:2.3:a:pcre:pcre:8.21:*:*:*:*:*:*:* Versions 8.21 Vulnerable ·PCRE
- cpe:2.3:a:pcre:pcre:8.30:*:*:*:*:*:*:* Versions 8.30 Vulnerable ·PCRE
Show 9 more CPE
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:pcre:pcre:8.31:*:*:*:*:*:*:* | 8.31 | Vulnerable | PCRE |
| cpe:2.3:a:pcre:pcre:8.32:*:*:*:*:*:*:* | 8.32 | Vulnerable | PCRE |
| cpe:2.3:a:pcre:pcre:8.33:*:*:*:*:*:*:* | 8.33 | Vulnerable | PCRE |
| cpe:2.3:a:pcre:pcre:8.34:*:*:*:*:*:*:* | 8.34 | Vulnerable | PCRE |
| cpe:2.3:a:pcre:pcre:8.35:*:*:*:*:*:*:* | 8.35 | Vulnerable | PCRE |
| cpe:2.3:a:pcre:pcre:8.36:*:*:*:*:*:*:* | 8.36 | Vulnerable | PCRE |
| cpe:2.3:a:pcre:pcre:8.37:*:*:*:*:*:*:* | 8.37 | Vulnerable | PCRE |
| cpe:2.3:a:pcre:pcre:8.38:*:*:*:*:*:*:* | 8.38 | Vulnerable | PCRE |
| cpe:2.3:a:pcre:pcre2:*:*:*:*:*:*:*:* | up to 10.21 | Vulnerable | PCRE |
- cpe:2.3:a:pcre:pcre:8.31:*:*:*:*:*:*:* Versions 8.31 Vulnerable ·PCRE
- cpe:2.3:a:pcre:pcre:8.32:*:*:*:*:*:*:* Versions 8.32 Vulnerable ·PCRE
- cpe:2.3:a:pcre:pcre:8.33:*:*:*:*:*:*:* Versions 8.33 Vulnerable ·PCRE
- cpe:2.3:a:pcre:pcre:8.34:*:*:*:*:*:*:* Versions 8.34 Vulnerable ·PCRE
- cpe:2.3:a:pcre:pcre:8.35:*:*:*:*:*:*:* Versions 8.35 Vulnerable ·PCRE
- cpe:2.3:a:pcre:pcre:8.36:*:*:*:*:*:*:* Versions 8.36 Vulnerable ·PCRE
- cpe:2.3:a:pcre:pcre:8.37:*:*:*:*:*:*:* Versions 8.37 Vulnerable ·PCRE
- cpe:2.3:a:pcre:pcre:8.38:*:*:*:*:*:*:* Versions 8.38 Vulnerable ·PCRE
- cpe:2.3:a:pcre:pcre2:*:*:*:*:*:*:*:* Versions up to 10.21 Vulnerable ·PCRE
Remediation
Red Hat 2 advisories
- RHSA-2016:1132 Released 2016-05-26 · Red Hat rating Importantrh-mariadb100-mariadb security update
- Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 6) rh-mariadb100-mariadb-1:10.0.25-4.el6, rh-mariadb100-mariadb-bench-1:10.0.25-4.el6, rh-mariadb100-mariadb-common-1:10.0.25-4.el6 +6
- Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-mariadb100-mariadb-1:10.0.25-4.el7, rh-mariadb100-mariadb-bench-1:10.0.25-4.el7, rh-mariadb100-mariadb-common-1:10.0.25-4.el7 +6
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 6.6) rh-mariadb100-mariadb-1:10.0.25-4.el6, rh-mariadb100-mariadb-bench-1:10.0.25-4.el6, rh-mariadb100-mariadb-common-1:10.0.25-4.el6 +6
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 6.7) rh-mariadb100-mariadb-1:10.0.25-4.el6, rh-mariadb100-mariadb-bench-1:10.0.25-4.el6, rh-mariadb100-mariadb-common-1:10.0.25-4.el6 +6
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.1) rh-mariadb100-mariadb-1:10.0.25-4.el7, rh-mariadb100-mariadb-bench-1:10.0.25-4.el7, rh-mariadb100-mariadb-common-1:10.0.25-4.el7 +6
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.2) rh-mariadb100-mariadb-1:10.0.25-4.el7, rh-mariadb100-mariadb-bench-1:10.0.25-4.el7, rh-mariadb100-mariadb-common-1:10.0.25-4.el7 +6
- Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 6) rh-mariadb100-mariadb-1:10.0.25-4.el6, rh-mariadb100-mariadb-bench-1:10.0.25-4.el6, rh-mariadb100-mariadb-common-1:10.0.25-4.el6 +6
- Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-mariadb100-mariadb-1:10.0.25-4.el7, rh-mariadb100-mariadb-bench-1:10.0.25-4.el7, rh-mariadb100-mariadb-common-1:10.0.25-4.el7 +6
- RHSA-2016:1025 Released 2016-05-11 · Red Hat rating Importantpcre security update
- Red Hat Enterprise Linux Client (v. 7) pcre-8.32-15.el7_2.1
- Red Hat Enterprise Linux Client Optional (v. 7) pcre-devel-8.32-15.el7_2.1, pcre-static-8.32-15.el7_2.1, pcre-tools-8.32-15.el7_2.1
- Red Hat Enterprise Linux ComputeNode (v. 7) pcre-8.32-15.el7_2.1
- Red Hat Enterprise Linux ComputeNode Optional (v. 7) pcre-devel-8.32-15.el7_2.1, pcre-static-8.32-15.el7_2.1, pcre-tools-8.32-15.el7_2.1
- Red Hat Enterprise Linux Server (v. 7) pcre-8.32-15.el7_2.1, pcre-8.32-15.el7_2.1.ppc, pcre-devel-8.32-15.el7_2.1 +1
- Red Hat Enterprise Linux Server Optional (v. 7) pcre-static-8.32-15.el7_2.1, pcre-static-8.32-15.el7_2.1.ppc, pcre-tools-8.32-15.el7_2.1
- Red Hat Enterprise Linux Workstation (v. 7) pcre-8.32-15.el7_2.1, pcre-devel-8.32-15.el7_2.1
- Red Hat Enterprise Linux Workstation Optional (v. 7) pcre-static-8.32-15.el7_2.1, pcre-tools-8.32-15.el7_2.1
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat JBoss Enterprise Web Server 3 | Affected | No fix planned: Will not fix |
| Red Hat Software Collections | Affected | No fix planned: Will not fix |
| Red Hat Enterprise Linux Client (v. 7) | Fixed | RHSA-2016:1025 |
| Red Hat Enterprise Linux Client Optional (v. 7) | Fixed | RHSA-2016:1025 |
| Red Hat Enterprise Linux ComputeNode (v. 7) | Fixed | RHSA-2016:1025 |
| Red Hat Enterprise Linux ComputeNode Optional (v. 7) | Fixed | RHSA-2016:1025 |
| Red Hat Enterprise Linux Server (v. 7) | Fixed | RHSA-2016:1025 |
| Red Hat Enterprise Linux Server Optional (v. 7) | Fixed | RHSA-2016:1025 |
| Red Hat Enterprise Linux Workstation (v. 7) | Fixed | RHSA-2016:1025 |
| Red Hat Enterprise Linux Workstation Optional (v. 7) | Fixed | RHSA-2016:1025 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 6) | Fixed | RHSA-2016:1132 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) | Fixed | RHSA-2016:1132 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 6.6) | Fixed | RHSA-2016:1132 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 6.7) | Fixed | RHSA-2016:1132 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.1) | Fixed | RHSA-2016:1132 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.2) | Fixed | RHSA-2016:1132 |
| Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 6) | Fixed | RHSA-2016:1132 |
| Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) | Fixed | RHSA-2016:1132 |
Not affected: 7 products
- Red Hat Directory Server 8
- Red Hat Enterprise Linux 5
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat JBoss Enterprise Web Server 1
- Red Hat JBoss Enterprise Web Server 2
- Red Hat Software Collections
Timeline
- 2026-10-02 Threatist record created from CVE-2016-3191
- 2026-10-03 Alias added: GHSA-68wg-f3j9-hgmv
- 2026-11-03 EPSS moved to the 95th–99th percentile
References
Advisory 2
Other 9
- http://vcs.pcre.org/pcre2?view=revision&revision=489
- http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html
- http://www-01.ibm.com/support/docview.wss?uid=isg3T1023886
- https://bugs.debian.org/815921
- https://bugs.debian.org/815920
- https://bugzilla.redhat.com/show_bug.cgi?id=1311503
- https://www.tenable.com/security/tns-2016-18
- https://bto.bluecoat.com/security-advisory/sa128
- http://vcs.pcre.org/pcre?view=revision&revision=1631
More Pcre vulnerabilities
- TI-2017-11950 In PCRE 8.41, after compiling, a pcretest load test PoC produces a crash overflow in the… CVSS 3.1MEDIUM 5.5
- TI-2015-02839 Heap-based buffer overflow in PCRE 8.34 through 8.37 and PCRE2 10.10 allows remote… CVSS 3.1CRITICAL 9.8
- TI-2016-01176 The pcre_compile2 function in pcre_compile.c in PCRE 8.38 mishandles the… CVSS 3.1CRITICAL 9.8
- TI-2015-06911 The pcre_compile function in pcre_compile.c in PCRE before 8.38 mishandles certain [… CVSS 3.1CRITICAL 9.8
- TI-2015-04255 Heap-based buffer overflow in the find_fixedlength function in pcre_compile.c in PCRE… CVSS 3.0CRITICAL 9.1
- TI-2019-15056 libpcre in PCRE before 8.43 allows a subject buffer over-read in JIT when UTF is… CVSS 3.1HIGH 7.5
Sources
- CVE-2016-3191 · CVE Program
- CVE-2016-3191 · NVD
- FIRST EPSS
- GHSA-68wg-f3j9-hgmv · GitHub Advisory Database · CC BY 4.0
- CVE-2016-3191 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences