Denial of Service via Long String in PHP gettext and stream_wrapper_register
PHP 5.2.5 and earlier are vulnerable to a denial of service condition when a long string is supplied to certain parameters in the gettext family of functions (dgettext, dcgettext, gettext, dngettext, ngettext) or the stream_wrapper_register function. Specifically, providing an excessively long string to the domain, message, msgid1, or classname parameters can cause the PHP process to crash. The vulnerability is context-dependent and may not be exploitable in all environments, particularly those with multi-threaded web servers, unless code execution can be demonstrated.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
An attacker can cause the PHP process to crash, resulting in a denial of service for the affected application. The impact is limited to application availability and does not directly allow for code execution or privilege escalation under typical configurations. The risk may be lower in multi-threaded web server environments.
If you can’t patch tonight, do this now.
Restrict access to the affected functions where possible, validate and limit the length of input parameters, and monitor for abnormal application crashes. Consider deploying web application firewalls or input validation libraries to further reduce risk.
Patch, then assume compromise.
Upgrade to a version of PHP later than 5.2.5 where this issue has been addressed. Ensure that all user-supplied input to the affected functions is properly validated and sanitized to prevent excessively long strings from being processed.
No validated public exploits yet. Hidden: 1 not yet analyzed, such as Exploit-DB entries.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
No public activity tracked yet. Mallory keeps watching.
No public activity observed for this vulnerability.