{"vuln_id":"CVE-2024-2757","aliases":["GHSA-fjp9-9hwx-59fq"],"description":"mb_encode_mimeheader runs endlessly for some inputs","published_at":"2024-04-11T23:00:59Z","modified_at":"2024-04-11T23:00:59Z","first_seen_at":"2026-11-22T14:05:37.632236Z","severity":"high","severity_source":"ghsa","cvss_score":7.5,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","cwe":[],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.01588,"epss_percentile":0.75932,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2024-2757"},"matched_alias":null,"items":[{"id":12676,"source":{"id":"gh-php-src","name":"PHP releases (GitHub php/php-src tags)"},"title":"GHSA-fjp9-9hwx-59fq / CVE-2024-2757: mb_encode_mimeheader runs endlessly for some inputs","summary":"mb_encode_mimeheader runs endlessly for some inputs\n\n### Summary\r\nCertain inputs provided to mb_encode_mimeheader trigger an endless loop.\r\n\r\n### Details\r\nA discernible pattern has not yet been identified, but a specific string consistently reproduces the issue.\r\n\r\n### PoC\r\nIn PHP 8.3.3, execute:\r\n```\r\n<?php\r\nmb_internal_encoding('UTF-8');\r\nmb_encode_mimeheader(\",9868949,9868978,9869015,9689100,9869121,9869615,9870690,9867116,98558119861183. \", \"utf-8\", \"B\");\r\n```\r\nThe mb_encode_mimeheader function seems to enter an infinite loop and fails to return.\r\n\r\n### Impact\r\nGiven 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.\r\nhttps://github.com/cakephp/cakephp/blob/5.x/src/Mailer/Message.php#L815\nPatched:  8.3.6","url":"https://github.com/php/php-src/security/advisories/GHSA-fjp9-9hwx-59fq","published_at":"2024-04-11T23:00:59Z","updated_at":"2024-04-11T23:00:59Z","fetched_at":"2026-11-22T14:05:37.431202Z","severity":"high","cvss_score":7.5,"epss":0.01588,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"php","product":"php-src","vuln_id":"CVE-2024-2757","vuln_ids":["CVE-2024-2757","GHSA-FJP9-9HWX-59FQ"],"tags":["repo-advisory","security","repo:php/php-src","stack"],"cluster_id":11788,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/12676","html":"https://vulnwatch.ve1ve2.com/item/12676"}}]}