CVE-2022-31628 | 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.

Published: 2022-09-28 Last update: 2024-11-21 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2022-31628 is rated Low Risk (12/100): CVSS Low severity, with low exploitation likelihood (EPSS 0.03%). Mandatory action: Low composite risk—no urgent action required; patch on your normal maintenance cycle and revisit priority if CVSS or EPSS increases.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2022-31628

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2025-11-21 0.10% 0.03% -0.07%
2 2025-11-18 0.01% 0.10% +0.10%
3 2025-03-17 0.01%

Full EPSS history (9 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2022-31628

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
2.3 3.1 LOW
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:L Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:H)
They need powerful rights—admin, root, or similar—before this pays off.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:L)
Might cause slowdowns, glitches, or partial disruption—not a full brick.
0.8 1.4 [email protected]
5.5 3.1 MEDIUM
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
1.8 3.6 [email protected]

Weakness enumeration for CVE-2022-31628

OS Trackers for CVE-2022-31628

vendor priority summary link
alpine medium CVE-2022-31628: 2 source package rows (php8, php81); 5 state rows across 4 repos (3.17-community, 3.18-community, 3.19-community, edge-community); fixed 5, open 0. https://security.alpinelinux.org/vuln/CVE-2022-31628
debian not yet assigned CVE-2022-31628 not yet assigned priority: Debian including 1 source packages (php7.4), 1 status rows across 1 suites (bullseye): resolved 1. https://security-tracker.debian.org/tracker/CVE-2022-31628
gentoo normal CVE-2022-31628: 1 GLSA(s) (202211-03), 1 atom(s) (dev-lang/php); latest impact normal. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2022-31628
redhat low https://access.redhat.com/security/cve/CVE-2022-31628
suse medium CVE-2022-31628 severity moderate: SUSE including 608 source package names (8-4.1:apache2-mod_php8-8.0.24-150400.4.14.1, 8-4.1:php8-8.0.24-150400.4.14.1, …), 2122 product×package rows across 48 product lines (Container bci/php, Container bci/php-apache, … (48 product lines)): Fixed 2122. https://www.suse.com/security/cve/CVE-2022-31628/
ubuntu medium CVE-2022-31628 medium priority: Ubuntu including 5 source packages (php5, php7.0, php7.2, php7.4, php8.1), 37 status rows across 13 suites (bionic, focal, jammy, kinetic, lunar, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): DNE 25, released 7, needs-triage 4, needed 1. https://ubuntu.com/security/CVE-2022-31628

Affected software / configurations for CVE-2022-31628

Vendor Product Version Raw CPE
php php < 7.4.31 cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
php php >= 8.0.0, < 8.0.24 cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
php php >= 8.1.0, < 8.1.11 cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
fedoraproject fedora 35 cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
fedoraproject fedora 36 cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*
fedoraproject fedora 37 cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:*
debian debian_linux 10.0 cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
debian debian_linux 11.0 cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*

References for CVE-2022-31628

cvelogic Threat Intelligence