Free and open · new CVEs checked every 20 minutesStatusRSSOpen dataContact

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

73
This week
CRITICAL 9.8REMOTEWATCHLISTDOWNGRADEUPGRADE

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 score9.8 (Critical)
Attack vectorNetwork (remote)
Attack complexityLow
Privileges neededNone
User interactionNone
EPSS exploit chance8.4% (top 5%)
CISA exploited listNo
WeaknessCWE-119
Published2016-03-17
Last modified2026-06-17
Publisher (CNA): Debian GNU/Linux · Vendor: pcre

Share: LinkedIn · X · Reddit

Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score

Am I affected?

Timeline

pcre pcre DOWNGRADE
Affected: 8.00 · 8.01 · 8.02 · 8.10 · 8.11 · 8.12 · 8.13 · 8.20
Fixed in: no fixed release known
Safe to downgrade to: a release before 8.00
1. Check installed version
apt-cache policy pcre || rpm -q pcre || pcre --version
2. No fixed release: DOWNGRADE to a release before 8.00 (Debian / Ubuntu)
apt-cache madison pcre sudo apt install pcre=<VERSION_BEFORE_8.00> sudo apt-mark hold pcre
2. No fixed release: DOWNGRADE (RHEL / Amazon Linux / Fedora)
dnf --showduplicates list pcre sudo dnf downgrade pcre-<VERSION_BEFORE_8.00> sudo dnf versionlock add pcre
Downgrade risk
Downgrading can break dependent software and may reopen older bugs. Read the distro advisory first and test on a non-production host.
After downgrade
Restart the service, and keep the package held until a fixed release ships.
pcre pcre2 UPGRADE
Affected: <= 10.21
Fixed in: newer than 10.21
Safe to downgrade to: no unaffected older release
1. Check installed version
apt-cache policy pcre2 || rpm -q pcre2 || pcre2 --version
2. UPGRADE to newer than 10.21 (Debian / Ubuntu)
sudo apt update && sudo apt install --only-upgrade pcre2
2. UPGRADE (RHEL / Amazon Linux / Fedora)
sudo dnf upgrade pcre2
Note
Distros often backport fixes without changing the version number. Confirm with the distro advisory or changelog.

Exact fixes by distribution

A distro patch exists: prefer upgrading over downgrading.
Fedora 46 · rust-ingredients · FIXED · 0.3.3-2.fc46 · FEDORA-2026-0b3d9feffd · source
sudo dnf upgrade --advisory=FEDORA-2026-0b3d9feffd
Fedora ELN · dpkg · FIXED · 1.23.11-2.eln159 · FEDORA-2026-732e4ac21b · source
sudo dnf upgrade --advisory=FEDORA-2026-732e4ac21b
Debian 12 · pcre2 · FIXED · 10.21-1
sudo apt update && sudo apt install --only-upgrade pcre2 dpkg --compare-versions "$(dpkg-query -W -f='${Version}' pcre2)" ge "10.21-1" && echo PATCHED || echo STILL-VULNERABLE
Debian 13 · pcre2 · FIXED · 10.21-1
sudo apt update && sudo apt install --only-upgrade pcre2 dpkg --compare-versions "$(dpkg-query -W -f='${Version}' pcre2)" ge "10.21-1" && echo PATCHED || echo STILL-VULNERABLE
Debian 12 · pcre3 · FIXED · 2:8.38-2
sudo apt update && sudo apt install --only-upgrade pcre3 dpkg --compare-versions "$(dpkg-query -W -f='${Version}' pcre3)" ge "2:8.38-2" && echo PATCHED || echo STILL-VULNERABLE
RHEL 7 · pcre · FIXED · pcre-8.32-15.el7_2.1
sudo dnf upgrade --advisory=RHSA-2016:1025 rpm -q pcre
RHEL 5 · pcre · NOT AFFECTED
RHEL 6 · glib2 · NOT AFFECTED
RHEL 6 · pcre · NOT AFFECTED
RHEL 7 · glib2 · NOT AFFECTED
Amazon Linux 1 · see advisory · FIXED · ALAS-2018-1076 · source
sudo yum update --advisory=ALAS-2018-1076
Verify at the official source NVD · CVE Program · Report a problem with this page
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

References

← Back to latest CVEs

Get the weekly exploited-CVE digest by emailThe CVEs being attacked this week and how to fix them. No spam, unsubscribe any time.