CVE-2011-3336
PHP vulnerability analysis and mitigation

Overview

CVE-2011-3336 is a vulnerability in the BSD implementation of libc's regcomp function that leads to denial of service through stack exhaustion. The vulnerability was discovered in 2011 and affects various BSD-based systems including NetBSD 5.1, OpenBSD 5.0, FreeBSD 8.2, and MacOSX (NIST NVD, CX Security).

Technical details

The vulnerability exists in the regcomp() function of BSD libc implementation where recursion and poor memory management can lead to unexpected application termination. The issue specifically occurs in the regular expression compilation process where certain patterns can trigger uncontrolled recursion and memory exhaustion. The vulnerability has a CVSS base score of 7.8/10, with an impact subscore of 6.9/10 and exploitability subscore of 10/10 (CX Security).

Impact

When exploited, this vulnerability can cause denial of service through stack exhaustion or memory exhaustion. In applications using regcomp() to process untrusted input, specially crafted regular expressions can cause the application to crash or consume excessive system resources (Full Disclosure).

Mitigation and workarounds

The recommended fix includes implementing memory usage limits (suggested at 128MB for one regcomp(3) call) and recursion limits (set to 256 levels). NetBSD has implemented these fixes in their libc implementation. For systems without patches, limiting the size of input passed to the regular expression engine or avoiding quantification nesting in expressions can help mitigate the issue (CX Security).

Community reactions

There were varying responses from different vendors regarding this vulnerability. While NetBSD worked to fix the flaws, Red Hat initially decided not to address similar issues in GNU libc, stating they did not consider it a security issue for client applications using regcomp() on untrusted input. This created some debate in the security community about the responsibility for securing regex implementations (CX Security).

Additional resources


SourceThis report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-23622HIGH8.7
  • PHPPHP
  • alextselegidis/easyappointments
NoNoJan 15, 2026
CVE-2025-14894HIGH7.5
  • PHPPHP
  • livewire-filemanager/filemanager
NoNoJan 16, 2026
CVE-2026-23626MEDIUM6.8
  • PHPPHP
  • kimai/kimai
NoYesJan 18, 2026
CVE-2025-69198MEDIUM6
  • PHPPHP
  • pterodactyl/panel
NoYesJan 19, 2026
CVE-2026-23496MEDIUM5.4
  • PHPPHP
  • pimcore/web2print-tools-bundle
NoYesJan 15, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management