CVE-2024-2757: PHP mb_encode_mimeheader runs endlessly for some inputs

Published Apr 11, 2024
·
Updated

Fixed bug GHSA-fjp9-9hwx-59fq (mbencodemimeheader runs endlessly for some inputs). (CVE-2024-2757)

Other sources

In PHP 8.3. before 8.3.5, function mbencodemimeheader() runs endlessly for some inputs that contain long strings of non-space characters followed by a space. This could lead to a potential DoS attack if a hostile user sends data to an application that uses this function.

MITRE

PHP mbencodemimeheader runs endlessly for some inputs

Microsoft

Affected Software

4 affected componentsFixes available
PHP PHP<8.3.6
8.3.6
PHP PHP>=8.3.0<8.3.5
Microsoft azl3 php 8.3.4-1<8.3.6-1
8.3.6-1
Microsoft azl3 php 8.3.6-1<8.3.6-1
8.3.6-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade PHP to a version that resolves this vulnerability.

    Fixed in 8.3.6
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 8.3.6-1
  3. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 8.3.5Patch GHSA-fjp9-9hwx-59fq

Event History

Apr 11, 2024
CVE Published
via PHP·12:00 AM
Apr 29, 2024
CVE Published
via MITRE·03:49 AM
Data Sourced
via MITRE·03:49 AM
DescriptionSeverity
Data Sourced
via NVD·04:15 AM
DescriptionSeverityWeaknessAffected Software
Jun 30, 2024
Data Sourced
via Microsoft·02:00 PM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·02:00 PM
Affected Software
Updated
via Microsoft·02:00 PM
Affected Software
Updated
via Microsoft·02:00 PM
DescriptionSeverity

Frequently Asked Questions

1

What is the severity of CVE-2024-2757?

CVE-2024-2757 has been classified as a moderate severity vulnerability due to its potential to cause an infinite loop in the mb_encode_mimeheader function.

2

How do I fix CVE-2024-2757?

To fix CVE-2024-2757, upgrade PHP to version 8.3.6 or later.

3

What versions of PHP are affected by CVE-2024-2757?

CVE-2024-2757 affects PHP versions prior to 8.3.5.

4

What is the bug in CVE-2024-2757 about?

The bug in CVE-2024-2757 causes the mb_encode_mimeheader function to run endlessly when it encounters certain long strings.

5

Is there a workaround for CVE-2024-2757 before upgrading?

Currently, it is recommended to avoid using inputs that have long strings of non-space characters followed by a space as a temporary workaround for CVE-2024-2757.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203