Description
The compile_regex function in pcre_compile.c in PCRE before 8.38 and pcre2_compile.c in PCRE2 before 10.2x mishandles the /(?J:(?|(:(?|(?'R')(\k'R')|((?'R')))H'Rk'Rf)|s(?'R'))))/ and /(?J:(?|(:(?|(?'R')(\z(?|(?'R')(\k'R')|((?'R')))k'R')|((?'R')))H'Ak'Rf)|s(?'R')))/ patterns, and related patterns with certain group references, which allows remote attackers to cause a denial of service (heap-based buffer overflow) or possibly have unspecified other impact via a crafted regular expression, as demonstrated by a JavaScript RegExp object encountered by Konqueror.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 12 | pcre3 | 2:8.38-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 14.04 LTS | pcre3 | 1:8.31-2ubuntu2.2 | USN-2943-1 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 2 | rh-mariadb100-mariadb +8 | 1:10.0.25-4.el6 | RHSA-2016:1132 |
| RHEL 2 | rh-php56 +2 | 2.3-1.el6 | RHSA-2016:2750 |
| RHEL 2 | rh-php56-php +27 | 5.6.25-1.el6 | RHSA-2016:2750 |
| RHEL 2 | rh-php56-php-pear | 1:1.9.5-4.el6 | RHSA-2016:2750 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 12 SP2 | pcre | 8.39-5.1 | SUSE-SU-2016:3161-1, SUSE-SU-2016:2971-1 |
| SLES 12 SP1 | pcre | 8.39-5.1 | SUSE-SU-2016:3161-1, SUSE-SU-2016:2971-1 |
| SLES 12 | pcre | 8.39-7.1 | SUSE-SU-2016:3161-1 |
Show 3 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 12 SP2 | pcre | 8.39-5.1 | SUSE-SU-2016:3161-1, SUSE-SU-2016:2971-1 |
| SLES for SAP 12 SP1 | pcre | 8.39-5.1 | SUSE-SU-2016:3161-1, SUSE-SU-2016:2971-1 |
| SLES for SAP 12 | pcre | 8.39-7.1 | SUSE-SU-2016:3161-1 |
Advisories 6
- WID-SEC-2023-1392 PCRE (Perl Compatible Regular Expressions): Mehrere Schwachstellen BSI CERT-Bund (WID) · Oct 6, 2026
- RHSA-2016:2750 Red Hat Security Advisory: rh-php56 security, bug fix, and enhancement update Red Hat Security Advisories (RHSA) · Aug 5, 2026
- RHSA-2016:1132 Red Hat Security Advisory: rh-mariadb100-mariadb security update Red Hat Security Advisories (RHSA) · Aug 5, 2026
- USN-2943-1 pcre3 vulnerabilities Ubuntu Security Notices (USN) · Apr 22, 2026
- SUSE-SU-2016:3161-1 Security update for pcre SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2016:2971-1 Security update for pcre SUSE / openSUSE Security Updates · Feb 4, 2026
References
- [oss-security] 20151128 Re: Heap Overflow in PCRE mailing-list
- RHSA-2016:1132 vendor-advisory
- RHSA-2016:2750 vendor-advisory
- 76187 vdb-entry
- https://bugs.exim.org/show_bug.cgi?id=1667
- https://bugs.exim.org/show_bug.cgi?id=1672
- https://bto.bluecoat.com/security-advisory/sa128
- http://vcs.pcre.org/pcre/code/trunk/ChangeLog?view=markup
- GLSA-201607-02 vendor-advisory