Track vulnerabilities like this one. Sign up free to get alerted when software you use is affected.
5.5

CVE-2022-31628: phar wrapper can occur dos when using quine gzip file

CVE-2022-31628 · published 4 years ago
Summary

In PHP versions before 7.4.31, 8.0.24 and 8.1.11, the phar uncompressor code would recursively uncompress "quines" gzip files, resulting in an infinite loop.

What to do
  • Update canonical php7.0 to version 7.0.33-0ubuntu0.16.04.16+esm5.
  • Update canonical php7.2 to version 7.2.24-0ubuntu0.18.04.15.
  • Update canonical php7.4 to version 7.4.3-4ubuntu2.15.
  • Update canonical php8.1 to version 8.1.2-1ubuntu2.8.
Affected software
Ecosystem VendorProductAffected versions
– php php < 7.4.31
>= 8.0.0, < 8.0.24
>= 8.1.0, < 8.1.11
cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
– fedoraproject fedora 35
36
37
cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
– debian debian_linux 10.0
11.0
cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
Ubuntu:Pro:14.04:LTS canonical php5 All versions
Ubuntu:Pro:16.04:LTS canonical php7.0 < 7.0.33-0ubuntu0.16.04.16+esm5
Fix: upgrade to 7.0.33-0ubuntu0.16.04.16+esm5
Ubuntu:18.04:LTS canonical php7.2 < 7.2.24-0ubuntu0.18.04.15
Fix: upgrade to 7.2.24-0ubuntu0.18.04.15
Ubuntu:20.04:LTS canonical php7.4 < 7.4.3-4ubuntu2.15
Fix: upgrade to 7.4.3-4ubuntu2.15
Ubuntu:22.04:LTS canonical php8.1 < 8.1.2-1ubuntu2.8
Fix: upgrade to 8.1.2-1ubuntu2.8
Original advisory text
phar wrapper can occur dos when using quine gzip file
In PHP versions before 7.4.31, 8.0.24 and 8.1.11, the phar uncompressor code would recursively uncompress "quines" gzip files, resulting in an infinite loop.
Fix within
Internet-facing 60 days
Internal At next upgrade
  • Not known to be exploited
  • Needs hands-on effort to exploit
  • Gives an attacker partial control
Severity
5.5 Medium
Exploitation
<1% chance of attack within 30 days
Type
CWE-674Uncontrolled Recursion
CWE-835Loop with Unreachable Exit Condition ('Infinite Loop')
Timeline
Published28 Sep 2022
Updated4 Nov 2026
First seen29 Sep 2026
Sources
Track software like this
Free during beta