CVE-2022-31628
PHP vulnerability analysis and mitigation

Overview

CVE-2022-31628 is a vulnerability discovered in PHP versions before 7.4.31, 8.0.24, and 8.1.11, where the phar uncompressor code would recursively uncompress "quines" gzip files, resulting in an infinite loop. The vulnerability was discovered in July 2022 and publicly disclosed in September 2022 (PHP Bug Report, CVE Mitre).

Technical details

The vulnerability exists in the phar uncompressor code of PHP, where it fails to properly handle "quine" gzip files. When processing these specially crafted files, the code enters an infinite loop during decompression. The vulnerability has been assigned a CVSS score of 5.5 (Medium) with the vector CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H (NetApp Advisory).

Impact

When successfully exploited, this vulnerability can lead to a Denial of Service (DoS) condition. The issue affects all PHP functions where the phar wrapper is available, including file operations such as file(), file_get_contents(), fopen(), and many others (PHP Bug Report).

Mitigation and workarounds

The vulnerability has been fixed in PHP versions 7.4.31, 8.0.24, and 8.1.11. Users are recommended to upgrade to these or later versions. The fix implements a limit on the number of recursive decompressions to prevent infinite loops (Debian Security, Gentoo Security).

Additional resources


SourceThis report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-21857HIGH8.3
  • PHPPHP
  • redaxo/source
NoYesJan 07, 2026
CVE-2025-61676MEDIUM6.1
  • PHPPHP
  • october/system
NoYesJan 10, 2026
CVE-2025-61674MEDIUM6.1
  • PHPPHP
  • october/system
NoYesJan 10, 2026
CVE-2026-21896MEDIUM5.8
  • PHPPHP
  • getkirby/cms
NoYesJan 08, 2026
CVE-2026-22242MEDIUM4.9
  • PHPPHP
  • coreshop/core-shop
NoYesJan 08, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management