CVE-2015-2305
NoneCVSS
—
EPSS
8.9%
Published
Mar 30, 2015
CISA due date
—
Cloudanix analysis
A long-standing flaw in a common text-matching component used by some software packages can let attackers take over affected systems if they supply specially crafted search patterns.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Moderate
- Impact
- Remote Code Execution
- Component
- Library
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Integer overflow during regex compilation in the Henry Spencer BSD regex library on 32-bit platforms leads to a heap-based buffer overflow that can be leveraged for arbitrary code execution.
Why it matters to the business
Systems using vulnerable versions of affected packages remain exposed to remote code execution; the age of the issue combined with available exploits and downstream package prevalence increases the urgency of patching to prevent full system compromise.
How an attack unfolds
An attacker supplies a specially crafted large regular expression to an application that invokes the vulnerable regcomp function; the integer overflow during compilation results in an undersized heap allocation followed by a buffer overflow that overwrites memory and executes attacker-controlled code.
How to fix it
Upgrade affected packages to the fixed versions: consul-1.17-fips, consul-1.17-fips-oci-entrypoint, and consul-1.17-fips-oci-entrypoint-compat to 1.17.4-r9 or later; rebuild any downstream images that embed the vulnerable library and redeploy.
How to confirm the fix worked
Verify package versions match or exceed the listed fixed releases; recompile test binaries against the updated library and confirm the integer-overflow path no longer produces an undersized allocation; monitor build pipelines for continued use of the alpha3.8.g5 regex sources.
Typical attack path
- Identify a network-accessible service or application that processes untrusted regular expressions using the vulnerable regex library
- Craft a large regex pattern that triggers the integer overflow in regcomp on 32-bit systems
- Send the malicious regex to the target, causing heap corruption and code execution
- Establish persistence or perform follow-on actions such as data exfiltration or lateral movement
How to detect it
Review application logs for unusually large or malformed regular-expression inputs around the time of suspected compromise; inspect process memory dumps or core files for signs of heap corruption following regex compilation calls; correlate any unexpected code execution or crashes in services that handle user-supplied regex patterns.
What your security team should do
- Immediately upgrade all listed Consul Chainguard packages to the stated fixed versions
- Scan container registries and build artifacts for any remaining instances of the vulnerable regex library
- Prioritize patching of 32-bit deployments first due to the platform-specific overflow condition
- Add dependency-version checks to CI pipelines to prevent reintroduction of the vulnerable library
The record
Integer overflow in the regcomp implementation in the Henry Spencer BSD regex library (aka rxspencer) alpha3.8.g5 on 32-bit platforms, as used in NetBSD through 6.1.5 and other products, might allow context-dependent attackers to execute arbitrary code via a large regular expression that leads to a heap-based buffer overflow.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:10 | clamav | 0 | 0.98.7+dfsg-1 |
| Debian:10 | nvi | 0 | 1.81.6-13 |
| Debian:10 | openrpt | 0 | No fix |
| Debian:10 | vigor | 0 | 0.016-24 |
| Debian:10 | vnc4 | 0 | 4.1.1+X4.3.0+t-1 |
| Debian:11 | clamav | 0 | 0.98.7+dfsg-1 |
| Debian:11 | librcsb-core-wrapper | 0 | 1.005-3 |
| Debian:11 | newlib | 0 | 2.0.0-1 |
| Debian:11 | nvi | 0 | 1.81.6-13 |
| Debian:11 | vigor | 0 | 0.016-24 |
| Debian:12 | clamav | 0 | 0.98.7+dfsg-1 |
| Debian:12 | librcsb-core-wrapper | 0 | 1.005-3 |
| Debian:12 | newlib | 0 | 2.0.0-1 |
| Debian:12 | nvi | 0 | 1.81.6-13 |
| Debian:12 | vigor | 0 | 0.016-24 |
| Debian:13 | clamav | 0 | 0.98.7+dfsg-1 |
| Debian:13 | librcsb-core-wrapper | 0 | 1.005-3 |
| Debian:13 | newlib | 0 | 2.0.0-1 |
| Debian:13 | nvi | 0 | 1.81.6-13 |
| Debian:13 | radare2 | 0 | 0.10.5+dfsg-1 |
| Debian:13 | vigor | 0 | 0.016-24 |
| Debian:14 | clamav | 0 | 0.98.7+dfsg-1 |
| Debian:14 | librcsb-core-wrapper | 0 | 1.005-3 |
| Debian:14 | newlib | 0 | 2.0.0-1 |
| Debian:14 | vigor | 0 | 0.016-24 |
| Debian:6.0 | clamav | 0 | 0.98.7+dfsg-0+deb6u1 |
| Debian:6.0 | php5 | 0 | 5.3.3.1-7+squeeze29 |
| Debian:7 | php5 | 0 | 5.4.38-0+deb7u1 |
| Mageia:4 | clamav | 0 | 0.98.7-1.mga4 |
| Mageia:4 | libzip | 0 | 0.11.2-1.1.mga4 |
| Mageia:4 | php | 0 | 5.5.23-1.mga4 |
| Mageia:4 | php-apc | 0 | 3.1.15-4.13.mga4 |
| Red Hat:rhel_software_collections:2::el6 | php54 | 0 | 0:2.0-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php54-php | 0 | 0:5.4.40-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php54-php-bcmath | 0 | 0:5.4.40-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php54-php-cli | 0 | 0:5.4.40-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php54-php-common | 0 | 0:5.4.40-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php54-php-dba | 0 | 0:5.4.40-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php54-php-debuginfo | 0 | 0:5.4.40-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php54-php-devel | 0 | 0:5.4.40-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php54-php-enchant | 0 | 0:5.4.40-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php54-php-fpm | 0 | 0:5.4.40-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php54-php-gd | 0 | 0:5.4.40-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php54-php-imap | 0 | 0:5.4.40-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php54-php-intl | 0 | 0:5.4.40-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php54-php-ldap | 0 | 0:5.4.40-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php54-php-mbstring | 0 | 0:5.4.40-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php54-php-mysqlnd | 0 | 0:5.4.40-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php54-php-odbc | 0 | 0:5.4.40-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php54-php-pdo | 0 | 0:5.4.40-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php54-php-pecl-zendopcache | 0 | 0:7.0.4-3.el6 |
| Red Hat:rhel_software_collections:2::el6 | php54-php-pecl-zendopcache-debuginfo | 0 | 0:7.0.4-3.el6 |
| Red Hat:rhel_software_collections:2::el6 | php54-php-pgsql | 0 | 0:5.4.40-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php54-php-process | 0 | 0:5.4.40-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php54-php-pspell | 0 | 0:5.4.40-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php54-php-recode | 0 | 0:5.4.40-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php54-php-snmp | 0 | 0:5.4.40-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php54-php-soap | 0 | 0:5.4.40-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php54-php-tidy | 0 | 0:5.4.40-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php54-php-xml | 0 | 0:5.4.40-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php54-php-xmlrpc | 0 | 0:5.4.40-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php54-runtime | 0 | 0:2.0-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php54-scldevel | 0 | 0:2.0-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55 | 0 | 0:2.0-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55-php | 0 | 0:5.5.21-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55-php-bcmath | 0 | 0:5.5.21-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55-php-cli | 0 | 0:5.5.21-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55-php-common | 0 | 0:5.5.21-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55-php-dba | 0 | 0:5.5.21-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55-php-debuginfo | 0 | 0:5.5.21-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55-php-devel | 0 | 0:5.5.21-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55-php-enchant | 0 | 0:5.5.21-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55-php-fpm | 0 | 0:5.5.21-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55-php-gd | 0 | 0:5.5.21-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55-php-gmp | 0 | 0:5.5.21-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55-php-imap | 0 | 0:5.5.21-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55-php-intl | 0 | 0:5.5.21-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55-php-ldap | 0 | 0:5.5.21-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55-php-mbstring | 0 | 0:5.5.21-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55-php-mysqlnd | 0 | 0:5.5.21-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55-php-odbc | 0 | 0:5.5.21-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55-php-opcache | 0 | 0:5.5.21-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55-php-pdo | 0 | 0:5.5.21-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55-php-pgsql | 0 | 0:5.5.21-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55-php-process | 0 | 0:5.5.21-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55-php-pspell | 0 | 0:5.5.21-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55-php-recode | 0 | 0:5.5.21-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55-php-snmp | 0 | 0:5.5.21-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55-php-soap | 0 | 0:5.5.21-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55-php-tidy | 0 | 0:5.5.21-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55-php-xml | 0 | 0:5.5.21-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55-php-xmlrpc | 0 | 0:5.5.21-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55-runtime | 0 | 0:2.0-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | php55-scldevel | 0 | 0:2.0-1.el6 |
| Red Hat:rhel_software_collections:2::el7 | php54 | 0 | 0:2.0-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | php54-php | 0 | 0:5.4.40-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | php54-php-bcmath | 0 | 0:5.4.40-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | php54-php-cli | 0 | 0:5.4.40-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | php54-php-common | 0 | 0:5.4.40-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | php54-php-dba | 0 | 0:5.4.40-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | php54-php-debuginfo | 0 | 0:5.4.40-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | php54-php-devel | 0 | 0:5.4.40-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | php54-php-enchant | 0 | 0:5.4.40-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | php54-php-fpm | 0 | 0:5.4.40-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | php54-php-gd | 0 | 0:5.4.40-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | php54-php-intl | 0 | 0:5.4.40-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | php54-php-ldap | 0 | 0:5.4.40-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | php54-php-mbstring | 0 | 0:5.4.40-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | php54-php-mysqlnd | 0 | 0:5.4.40-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | php54-php-odbc | 0 | 0:5.4.40-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | php54-php-pdo | 0 | 0:5.4.40-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | php54-php-pecl-zendopcache | 0 | 0:7.0.4-3.el7 |
| Red Hat:rhel_software_collections:2::el7 | php54-php-pecl-zendopcache-debuginfo | 0 | 0:7.0.4-3.el7 |
| Red Hat:rhel_software_collections:2::el7 | php54-php-pgsql | 0 | 0:5.4.40-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | php54-php-process | 0 | 0:5.4.40-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | php54-php-pspell | 0 | 0:5.4.40-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | php54-php-recode | 0 | 0:5.4.40-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | php54-php-snmp | 0 | 0:5.4.40-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | php54-php-soap | 0 | 0:5.4.40-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | php54-php-xml | 0 | 0:5.4.40-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | php54-php-xmlrpc | 0 | 0:5.4.40-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | php54-runtime | 0 | 0:2.0-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | php54-scldevel | 0 | 0:2.0-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | php55 | 0 | 0:2.0-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | php55-php | 0 | 0:5.5.21-2.el7 |
| Red Hat:rhel_software_collections:2::el7 | php55-php-bcmath | 0 | 0:5.5.21-2.el7 |
| Red Hat:rhel_software_collections:2::el7 | php55-php-cli | 0 | 0:5.5.21-2.el7 |
| Red Hat:rhel_software_collections:2::el7 | php55-php-common | 0 | 0:5.5.21-2.el7 |
| Red Hat:rhel_software_collections:2::el7 | php55-php-dba | 0 | 0:5.5.21-2.el7 |
| Red Hat:rhel_software_collections:2::el7 | php55-php-debuginfo | 0 | 0:5.5.21-2.el7 |
| Red Hat:rhel_software_collections:2::el7 | php55-php-devel | 0 | 0:5.5.21-2.el7 |
| Red Hat:rhel_software_collections:2::el7 | php55-php-enchant | 0 | 0:5.5.21-2.el7 |
| Red Hat:rhel_software_collections:2::el7 | php55-php-fpm | 0 | 0:5.5.21-2.el7 |
| Red Hat:rhel_software_collections:2::el7 | php55-php-gd | 0 | 0:5.5.21-2.el7 |
| Red Hat:rhel_software_collections:2::el7 | php55-php-gmp | 0 | 0:5.5.21-2.el7 |
| Red Hat:rhel_software_collections:2::el7 | php55-php-intl | 0 | 0:5.5.21-2.el7 |
| Red Hat:rhel_software_collections:2::el7 | php55-php-ldap | 0 | 0:5.5.21-2.el7 |
| Red Hat:rhel_software_collections:2::el7 | php55-php-mbstring | 0 | 0:5.5.21-2.el7 |
| Red Hat:rhel_software_collections:2::el7 | php55-php-mysqlnd | 0 | 0:5.5.21-2.el7 |
| Red Hat:rhel_software_collections:2::el7 | php55-php-odbc | 0 | 0:5.5.21-2.el7 |
| Red Hat:rhel_software_collections:2::el7 | php55-php-opcache | 0 | 0:5.5.21-2.el7 |
| Red Hat:rhel_software_collections:2::el7 | php55-php-pdo | 0 | 0:5.5.21-2.el7 |
| Red Hat:rhel_software_collections:2::el7 | php55-php-pgsql | 0 | 0:5.5.21-2.el7 |
| Red Hat:rhel_software_collections:2::el7 | php55-php-process | 0 | 0:5.5.21-2.el7 |
| Red Hat:rhel_software_collections:2::el7 | php55-php-pspell | 0 | 0:5.5.21-2.el7 |
| Red Hat:rhel_software_collections:2::el7 | php55-php-recode | 0 | 0:5.5.21-2.el7 |
| Red Hat:rhel_software_collections:2::el7 | php55-php-snmp | 0 | 0:5.5.21-2.el7 |
| Red Hat:rhel_software_collections:2::el7 | php55-php-soap | 0 | 0:5.5.21-2.el7 |
| Red Hat:rhel_software_collections:2::el7 | php55-php-xml | 0 | 0:5.5.21-2.el7 |
| Red Hat:rhel_software_collections:2::el7 | php55-php-xmlrpc | 0 | 0:5.5.21-2.el7 |
| Red Hat:rhel_software_collections:2::el7 | php55-runtime | 0 | 0:2.0-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | php55-scldevel | 0 | 0:2.0-1.el7 |
| SUSE:Linux Enterprise Desktop 12 | clamav | 0 | 0.98.7-13.1 |
| SUSE:Linux Enterprise Module for Web and Scripting 12 | php5 | 0 | 5.5.14-22.1 |
| SUSE:Linux Enterprise Server 11 SP2-LTSS | php53 | 0 | 5.3.17-47.1 |
| SUSE:Linux Enterprise Server 12 | clamav | 0 | 0.98.7-13.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 | clamav | 0 | 0.98.7-13.1 |
| SUSE:Linux Enterprise Software Development Kit 12 | php5 | 0 | 5.5.14-22.1 |
| Ubuntu:14.04:LTS | clamav | 0 | 0.98.7+dfsg-0ubuntu0.14.04.1 |
| Ubuntu:14.04:LTS | llvm-toolchain-3.6 | 0 | 1:3.6-2ubuntu1~trusty2 |
| Ubuntu:14.04:LTS | newlib | 0 | 2.1.0-3 |
| Ubuntu:14.04:LTS | php5 | 0 | 5.5.9+dfsg-1ubuntu4.9 |
| Ubuntu:14.04:LTS | vigor | 0 | 0.016-24build0.14.04.1 |
| Ubuntu:16.04:LTS | llvm-toolchain-3.5 | 0 | 1:3.5.2-2 |
| Ubuntu:16.04:LTS | llvm-toolchain-3.6 | 0 | 1:3.6.2-3ubuntu2 |
| Ubuntu:16.04:LTS | nvi | 0 | No fix |
| Ubuntu:16.04:LTS | openrpt | 0 | No fix |
| Ubuntu:16.04:LTS | radare2 | 0 | No fix |
| Ubuntu:16.04:LTS | vigor | 0 | 0.016-24 |
| Ubuntu:18.04:LTS | nvi | 0 | 1.81.6-13 |
| Ubuntu:18.04:LTS | openrpt | 0 | No fix |
| Ubuntu:18.04:LTS | radare2 | 0 | 2.3.0+dfsg-2 |
| Ubuntu:24.04:LTS | radare2 | 0 | 5.5.0+dfsg-1ubuntu1 |
| Ubuntu:Pro:16.04:LTS | nvi | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | openrpt | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | radare2 | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | openrpt | 0 | No fix |
| openSUSE:Tumbleweed | clamav | 0 | 0.99.2-4.1 |
| openSUSE:Tumbleweed | php5 | 0 | 5.6.28-1.1 |
| openSUSE:Tumbleweed | php7 | 0 | 7.0.14-1.4 |
Related vulnerabilities
- CVE-2023-20197 A vulnerability in the filesystem image parser for Hierarchical File System Plus (HFS+)… Also affects clamav
- CVE-2023-20052 On Feb 15, 2023, the following vulnerability in the ClamAV scanning library was… Also affects clamav
- CVE-2023-20032 On Feb 15, 2023, the following vulnerability in the ClamAV scanning library was… Also affects clamav
- CVE-2017-11423 The cabd_read_string function in mspack/cabd.c in libmspack 0.5alpha, as used in ClamAV… Also affects clamav
- CVE-2012-1457 The TAR file parser in Avira AntiVir 7.11.1.163, Antiy Labs AVL SDK 2.0.3.7, avast! Also affects clamav
- CVE-2012-1459 The TAR file parser in AhnLab V3 Internet Security 2011.01.18.00, Avira AntiVir… Also affects clamav
- CVE-2012-1458 The Microsoft CHM file parser in ClamAV 0.96.4 and Sophos Anti-Virus 4.61.0 allows remote… Also affects clamav
- CVE-2012-1419 The TAR file parser in ClamAV 0.96.4 and Quick Heal (aka Cat QuickHeal) 11.00 allows… Also affects clamav