CWE
787 590 119
Advisory Published
CVE Published
CVE Published
Updated

CVE-2022-31627: Heap buffer overflow in finfo_buffer

First published: Tue Jul 05 2022(Updated: )

In PHP versions 8.1.x below 8.1.8, when fileinfo functions, such as finfo_buffer, due to incorrect patch applied to the third party code from libmagic, incorrect function may be used to free allocated memory, which may lead to heap corruption.

Credit: security@php.net

Affected SoftwareAffected VersionHow to fix
PHP>=8.1.0<8.1.8
PHP<8.1.8
8.1.8

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is CVE-2022-31627?

    CVE-2022-31627 is a fixed bug in PHP versions 8.1.x below 8.1.8.

  • What is the severity of CVE-2022-31627?

    CVE-2022-31627 has a severity level of critical with a score of 9.8.

  • How does CVE-2022-31627 affect PHP?

    CVE-2022-31627 can lead to heap corruption in PHP versions 8.1.x below 8.1.8 when using fileinfo functions.

  • How can I fix CVE-2022-31627?

    To fix CVE-2022-31627, upgrade PHP to version 8.1.8 or above.

  • Where can I find more information about CVE-2022-31627?

    You can find more information about CVE-2022-31627 at the following references: [link1], [link2], [link3].

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.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203