VulnWatch by ve1ve2
high 7.5 EPSS 1.59%

GHSA-fjp9-9hwx-59fq / CVE-2024-2757: mb_encode_mimeheader runs endlessly for some inputs

Source:
PHP releases (GitHub php/php-src tags)
Published:
Fetched:
Updated:
Affects:
php php-src

https://github.com/php/php-src/security/advisories/GHSA-fjp9-9hwx-59fq ↗

repo-advisorysecurityrepo:php/php-srcstack

mb_encode_mimeheader runs endlessly for some inputs ### Summary Certain inputs provided to mb_encode_mimeheader trigger an endless loop. ### Details A discernible pattern has not yet been identified, but a specific string consistently reproduces the issue. ### PoC In PHP 8.3.3, execute: ``` <?php mb_internal_encoding('UTF-8'); mb_encode_mimeheader(",9868949,9868978,9869015,9689100,9869121,9869615,9870690,9867116,98558119861183. ", "utf-8", "B"); ``` The mb_encode_mimeheader function seems to enter an infinite loop and fails to return. ### Impact Given that this function is integral to numerous email processing routines, including those handling potentially untrusted user inputs, this vulnerability could be exploited for denial-of-service attacks. For instance, CakePHP 5 relies on this function to encode email subjects. https://github.com/cakephp/cakephp/blob/5.x/src/Mailer/Message.php#L815 Patched: 8.3.6

Linked vulnerabilities (2)

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

mb_encode_mimeheader runs endlessly for some inputs

Aliases: CVE-2024-2757
CVE-2024-2757 high 7.5 EPSS 1.59% (p76) NVDCVE.orgGHSA
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

mb_encode_mimeheader runs endlessly for some inputs

Aliases: GHSA-fjp9-9hwx-59fq