CVE-2016-3191: Buffer Overflow

Published Feb 24, 2016
·
Updated

The compilebranch function in pcrecompile.c in PCRE 8.x before 8.39 and pcre2compile.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.

Other sources

ZDI reported a stack-based buffer overflow in pcre and pcre2. ZDI-CAN-3542 id is used to identify the issue.

https://bugs.exim.org/showbug.cgi?id=1791

PCRE does not validate that handling the (ACCEPT) verb will occur within the bounds of the cworkspace stack buffer, leading to a stack buffer overflow.

Fixed upstream in pcre and pcre2 via the following commits:

http://vcs.pcre.org/pcre?view=revision&revision=1631 http://vcs.pcre.org/pcre2?view=revision&revision=489

Issue is triggered by the following pattern:

/(00/

PCRE 8.00 seems to be the first affected version.

Red Hat

Affected Software

21 affected componentsFixes available
redhat/pcre<8.39
8.39
redhat/pcre2<10.22
10.22
pcre pcre=8.00
pcre pcre=8.01
pcre pcre=8.02
pcre pcre=8.10
pcre pcre=8.11
pcre pcre=8.12
pcre pcre=8.13
pcre pcre=8.20
pcre pcre=8.21
pcre pcre=8.30
pcre pcre=8.31
pcre pcre=8.32
pcre pcre=8.33
pcre pcre=8.34
pcre pcre=8.35
pcre pcre=8.36
pcre pcre=8.37
pcre pcre=8.38
PCRE pcre2<=10.21

Event History

Mar 17, 2016
CVE Published
via MITRE·11:00 PM
Data Sourced
via MITRE·11:00 PM
Description

Frequently Asked Questions

1

What is the severity of CVE-2016-3191?

CVE-2016-3191 has a critical severity level, allowing for remote code execution or denial of service attacks.

2

How do I fix CVE-2016-3191?

To fix CVE-2016-3191, update to PCRE version 8.39 or PCRE2 version 10.22 or later.

3

What software is affected by CVE-2016-3191?

CVE-2016-3191 affects PCRE versions prior to 8.39 and PCRE2 versions prior to 10.22.

4

Can CVE-2016-3191 be exploited remotely?

Yes, CVE-2016-3191 can be exploited remotely through specially crafted patterns.

5

What vulnerabilities does CVE-2016-3191 relate to?

CVE-2016-3191 relates to vulnerabilities in pattern handling, specifically involving the (*ACCEPT) substring.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203