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 | Vendor | Product | Affected 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.
References
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/31xxx/CVE-2022-31628... Vendor Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2022-31628 Vendor Advisory
- https://ubuntu.com/security/CVE-2022-31628 Third Party Advisory
- https://bugs.php.net/bug.php?id=81726 Third Party Advisory
- https://github.com/php/php-src/commit/404e8bdb68350931176a5bdc86fc417b34fb583d Third Party Advisory
- https://github.com/php/php-src/commit/432bf196d59bcb661fcf9cb7029cea9b43f490af Third Party Advisory
- https://ubuntu.com/security/notices/USN-5717-1 Vendor Advisory
- https://ubuntu.com/security/notices/USN-5905-1 Vendor Advisory
- https://www.cve.org/CVERecord?id=CVE-2022-31628 Third Party Advisory
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedorapro... Vendor Advisory
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedorapro... Vendor Advisory
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedorapro... Vendor Advisory
- https://security.gentoo.org/glsa/202211-03 Vendor Advisory
- https://security.netapp.com/advisory/ntap-20221209-0001/ Vendor Advisory
- https://www.debian.org/security/2022/dsa-5277 Vendor Advisory
- https://lists.debian.org/debian-lts-announce/2022/12/msg00030.html Third Party Advisory
Internet-facing
60 days
Internal
At next upgrade
- Not known to be exploited
- Needs hands-on effort to exploit
- Gives an attacker partial control
Type
CWE-674Uncontrolled Recursion
CWE-835Loop with Unreachable Exit Condition ('Infinite Loop')
Timeline
Published28 Sep 2022
Updated4 Nov 2026
First seen29 Sep 2026
Track software like this
Free during beta