Heap-based buffer overflow in PCRE - CVE-2016-1283

 

Heap-based buffer overflow in PCRE - CVE-2016-1283

Published: January 3, 2016 / Updated: August 3, 2020


Vulnerability identifier: #VU33236
CSH Severity: High
CVSS v4: 9.3 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2016-1283
CWE-ID: CWE-122
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to execute arbitrary code on the target system.

The vulnerability exists due to a boundary error in The pcre_compile2 function in pcre_compile.c in PCRE 8.38 mishandles the /((?:F?+(?:^(?(R)a+"){99}-))(?J)(?'R'(?'R'<((?'RR'(?'R'){97)?J)?J)(?'R'(?'R'){99|(:(?|(?'R')(k'R')|((?'R')))H'R'R)(H'R))))))/ pattern and related patterns with named subgroups, which. A remote attacker can use a crafted regular expression to trigger heap-based buffer overflow and execute arbitrary code on the target system.

Successful exploitation of this vulnerability may result in complete compromise of vulnerable system.


Affected software

PCRE
Amazon Linux AMI
Slackware Linux
Fedora
php5 (Alpine package)
php7 (Alpine package)
php
pcre

How to mitigate CVE-2016-1283

Update to version 8.39.

PCRE - update to 8.39
php5 (Alpine package) - update to 5.6.32-r0
php7 (Alpine package) - update to 7.0.25-r0
php - addressed in versions 7.0.25-1.fc25, 7.1.11-1.fc26, 7.1.11-1.fc27
pcre - addressed in versions 8.38-3.fc22, 8.38-6.fc23

External References

Related Security Bulletins