Skip to content
OpenAdvisories
Medium · 6.5 Public exploit CVE-2022-31629 EUVD-2022-53081GHSA-c43m-486j-j32p

$_COOKIE names string replacement (. -> _): cookie integrity vulnerabilities

Published Sep 28, 2022 · Updated Nov 4, 2025 · Assigned by php

Description

In PHP versions before 7.4.31, 8.0.24 and 8.1.11, the vulnerability enables network and same-site attackers to set a standard insecure cookie in the victim's browser which is treated as a `__Host-` or `__Secure-` cookie by PHP applications.

Affected products

VendorProductAffectedFixed
PHP Group PHP 7.4.X – < 7.4.31, 8.0.X – < 8.0.24, 8.1.X – < 8.1.11 7.4.31

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 11 php7.4 7.4.33-1+deb11u1 DSA-5277-1
Debian 10 php7.3 7.3.31-1~deb10u2 DLA-3243-1
ReleasePackageFixed inAdvisory
Ubuntu 22.04 LTS php8.1 8.1.2-1ubuntu2.8 USN-5717-1
Ubuntu 20.04 LTS php7.4 7.4.3-4ubuntu2.15 USN-5717-1
Ubuntu 18.04 LTS php7.2 7.2.24-0ubuntu0.18.04.15 USN-5717-1
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 16.04 LTS php7.0 7.0.33-0ubuntu0.16.04.16+esm5 USN-5905-1
Ubuntu Pro 14.04 LTS php5 No fix yet —
ReleasePackageFixed inAdvisory
RHEL 9 apcu-panel +2 5.1.21-1.module+el9.1.0.z+15477+cb86791d RHSA-2023:2417
RHEL 9 php +23 8.0.27-1.el9_1 RHSA-2023:2417, RHSA-2023:0965
RHEL 9 php-pecl-rrd 2.0.3-4.module+el9.1.0.z+15477+cb86791d RHSA-2023:2417
RHEL 9 php-pecl-xdebug3 3.1.4-1.module+el9.1.0.z+15477+cb86791d RHSA-2023:2417
RHEL 9 php-pecl-zip 1.20.1-1.module+el9.1.0.z+15477+cb86791d RHSA-2023:2417
RHEL 8 apcu-panel +2 5.1.18-1.module+el8.3.0+6678+b09f589e RHSA-2023:2903, RHSA-2023:0848
RHEL 8 libzip +2 1.6.1-1.module+el8.3.0+6678+b09f589e RHSA-2023:2903, RHSA-2023:0848
RHEL 8 php +25 7.4.33-1.module+el8.8.0+17865+ef7eddfa RHSA-2023:2903, RHSA-2023:0848
RHEL 8 php-pear 1:1.10.13-1.module+el8.6.0+13671+84712317 RHSA-2023:2903, RHSA-2023:0848
RHEL 8 php-pecl-rrd 2.0.1-1.module+el8.3.0+6678+b09f589e RHSA-2023:2903, RHSA-2023:0848
RHEL 8 php-pecl-xdebug 2.9.5-1.module+el8.3.0+6678+b09f589e RHSA-2023:2903
RHEL 8 php-pecl-xdebug3 3.1.2-1.module+el8.6.0+13671+84712317 RHSA-2023:0848
RHEL 8 php-pecl-zip 1.18.2-1.module+el8.3.0+6678+b09f589e RHSA-2023:2903, RHSA-2023:0848

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 9 apcu-panel +2 5.1.21-1.module_el9.1.0+15+94ba28e4 ALSA-2024:10950, ALSA-2024:10949, ALSA-2023:2417
AlmaLinux 9 php +23 8.0.27-1.el9_1 ALSA-2024:10950, ALSA-2024:10949, ALSA-2023:2417
AlmaLinux 9 php-pecl-rrd 2.0.3-4.module_el9.1.0+15+94ba28e4 ALSA-2024:10950, ALSA-2024:10949, ALSA-2023:2417
AlmaLinux 9 php-pecl-xdebug3 3.1.4-1.module_el9.1.0+15+94ba28e4 ALSA-2024:10950, ALSA-2024:10949, ALSA-2023:2417
AlmaLinux 9 php-pecl-zip 1.20.1-1.module_el9.1.0+15+94ba28e4 ALSA-2024:10950, ALSA-2024:10949, ALSA-2023:2417
AlmaLinux 8 apcu-panel +2 5.1.18-1.module_el8.6.0+2750+78feabcb ALSA-2024:10952, ALSA-2024:10951, ALSA-2023:2903
AlmaLinux 8 libzip +2 1.6.1-1.module_el8.6.0+2750+78feabcb ALSA-2024:10952, ALSA-2024:10951, ALSA-2023:2903
AlmaLinux 8 php +25 7.4.33-1.module_el8.8.0+3477+f828cbb0 ALSA-2024:10952, ALSA-2024:10951, ALSA-2023:2903
AlmaLinux 8 php-pear 1:1.10.13-1.module_el8.6.0+2739+efabdb8f ALSA-2024:10952, ALSA-2024:10951, ALSA-2023:2903
AlmaLinux 8 php-pecl-rrd 2.0.1-1.module_el8.3.0+2009+b272fdef ALSA-2024:10952, ALSA-2024:10951, ALSA-2023:2903
AlmaLinux 8 php-pecl-xdebug 2.9.5-1.module_el8.6.0+2750+78feabcb ALSA-2024:10952, ALSA-2023:2903
AlmaLinux 8 php-pecl-xdebug3 3.1.2-1.module_el8.6.0+2739+efabdb8f ALSA-2024:10951, ALSA-2023:0848
AlmaLinux 8 php-pecl-zip 1.18.2-1.module_el8.6.0+2750+78feabcb ALSA-2024:10952, ALSA-2024:10951, ALSA-2023:2903

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 9 php 8.0.27-1.el9_1 RLSA-2023:0965
Rocky Linux 9 php-pecl-apcu 5.1.21-1.module+el9.7.0+40003+454ed3c4 RLSA-2023:2417
Rocky Linux 9 php-pecl-rrd 2.0.3-4.module+el9.7.0+40003+454ed3c4 RLSA-2023:2417
Rocky Linux 9 php-pecl-xdebug3 3.1.4-1.module+el9.7.0+40003+454ed3c4 RLSA-2023:2417
Rocky Linux 9 php-pecl-zip 1.20.1-1.module+el9.7.0+40003+454ed3c4 RLSA-2023:2417
Rocky Linux 8 libzip 1.6.1-1.module+el8.10.0+1604+6558efc7 RLSA-2023:2903, RLSA-2023:0848
Rocky Linux 8 php 7.4.33-1.module+el8.10.0+1604+6558efc7 RLSA-2023:2903, RLSA-2023:0848
Rocky Linux 8 php-pear 1:1.10.13-1.module+el8.7.0+1067+0a7071cc RLSA-2023:2903, RLSA-2023:0848
Rocky Linux 8 php-pecl-apcu 5.1.18-1.module+el8.10.0+1604+6558efc7 RLSA-2023:2903, RLSA-2023:0848
Rocky Linux 8 php-pecl-rrd 2.0.1-1.module+el8.4.0+414+2e7afcdd RLSA-2023:2903, RLSA-2023:0848
Rocky Linux 8 php-pecl-xdebug 2.9.5-1.module+el8.10.0+1604+6558efc7 RLSA-2023:2903
Rocky Linux 8 php-pecl-xdebug3 3.1.2-1.module+el8.6.0+790+fc63e43f RLSA-2023:0848
Rocky Linux 8 php-pecl-zip 1.18.2-1.module+el8.10.0+1604+6558efc7 RLSA-2023:2903, RLSA-2023:0848
ReleasePackageFixed inAdvisory
SLES 15 SP4 php7 +4 7.4.33-150400.4.13.1 SUSE-SU-2022:3997-1
SLES 15 SP4 php8 +5 8.0.24-150400.4.14.1 SUSE-SU-2022:3661-1
SLES 15 SP3 php7 7.4.33-150200.3.46.2 SUSE-SU-2022:4069-1
SLES 15 SP2 php7 7.4.33-150200.3.46.2 SUSE-SU-2022:4069-1
SLES 15 SP1 php7 7.2.34-150000.4.103.1 SUSE-SU-2022:4067-1
SLES 15 php7 7.2.34-150000.4.103.1 SUSE-SU-2022:4067-1
Show 13 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES 12 SP5 php72 7.2.5-1.84.1 SUSE-SU-2022:3957-1
SLES 12 SP5 php74 7.4.33-1.47.2 SUSE-SU-2022:4068-1
SLES 12 php72 7.2.5-1.84.1 SUSE-SU-2022:3957-1
SLES 12 php74 7.4.33-1.47.2 SUSE-SU-2022:4068-1
SLES for SAP 15 SP2 php7 7.4.33-150200.3.46.2 SUSE-SU-2022:4069-1
SLES for SAP 15 SP1 php7 7.2.34-150000.4.103.1 SUSE-SU-2022:4067-1
SLES for SAP 15 php7 7.2.34-150000.4.103.1 SUSE-SU-2022:4067-1
SLE HPC 15 SP2 php7 7.4.33-150200.3.46.2 SUSE-SU-2022:4069-1
SLE HPC 15 SP1 php7 7.2.34-150000.4.103.1 SUSE-SU-2022:4067-1
SLE HPC 15 php7 7.2.34-150000.4.103.1 SUSE-SU-2022:4067-1
SUSE Manager Server 4.1 php7 7.4.33-150200.3.46.2 SUSE-SU-2022:4069-1
SUSE Manager Retail Branch Server 4.1 php7 7.4.33-150200.3.46.2 SUSE-SU-2022:4069-1
SUSE Manager Proxy 4.1 php7 7.4.33-150200.3.46.2 SUSE-SU-2022:4069-1
SUSE Enterprise Storage 7 php7 7.4.33-150200.3.46.2 SUSE-SU-2022:4069-1
SUSE Enterprise Storage 6 php7 7.2.34-150000.4.103.1 SUSE-SU-2022:4067-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed php8 8.3.6-1.1 openSUSE-SU-2024:13867-1
openSUSE Leap 15.4 php7 7.2.5-150000.4.98.2 SUSE-SU-2022:4069-1, SUSE-SU-2022:4067-1, SUSE-SU-2022:3997-1
openSUSE Leap 15.4 php7-fpm +3 7.4.33-150400.4.13.1 SUSE-SU-2022:3997-1
openSUSE Leap 15.4 php7-test 7.4.33-150400.4.13.2 SUSE-SU-2022:3997-1
openSUSE Leap 15.4 php8 +5 8.0.24-150400.4.14.1 SUSE-SU-2022:3661-1
openSUSE Leap 15.3 php7 +1 7.4.33-150200.3.46.2 SUSE-SU-2022:4069-1
ReleasePackageFixed inAdvisory
Alpine v3.19 php81 8.1.11-r0 —
Alpine v3.18 php81 8.1.11-r0 —
Alpine v3.17 php81 8.1.11-r0 —
Alpine v3.16 php8 8.0.24-r0 —
Alpine v3.16 php81 8.1.11-r0 —
Alpine v3.15 php7 7.4.32-r0 —
Alpine v3.15 php8 8.0.25-r0 —
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.14 php7 7.4.32-r0 —
Alpine v3.14 php8 8.0.24-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 php8.1 +23 8.1.14-1.amzn2023.0.2 ALAS2023-2023-081

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 9 apcu-panel +2 5.1.21-1.module+el9.1.0+20776+c1b960c0 ELSA-2023-2417
Oracle Linux 9 php +23 8.0.27-1.el9_1 ELSA-2023-2417, ELSA-2023-0965
Oracle Linux 9 php-pecl-rrd 2.0.3-4.module+el9.1.0+20776+c1b960c0 ELSA-2023-2417
Oracle Linux 9 php-pecl-xdebug3 3.1.4-1.module+el9.1.0+20776+c1b960c0 ELSA-2023-2417
Oracle Linux 9 php-pecl-zip 1.20.1-1.module+el9.1.0+20776+c1b960c0 ELSA-2023-2417
Oracle Linux 8 apcu-panel +2 5.1.18-1.module+el8.3.0+7685+72d70b58 ELSA-2023-2903, ELSA-2023-0848
Oracle Linux 8 libzip +2 1.6.1-1.module+el8.3.0+7685+72d70b58 ELSA-2023-2903, ELSA-2023-0848
Oracle Linux 8 php +25 7.4.33-1.module+el8.8.0+20974+ef7eddfa ELSA-2023-2903, ELSA-2023-0848
Oracle Linux 8 php-pear 1:1.10.13-1.module+el8.6.0+20568+84712317 ELSA-2023-2903, ELSA-2023-0848
Oracle Linux 8 php-pecl-rrd 2.0.1-1.module+el8.3.0+7685+72d70b58 ELSA-2023-2903, ELSA-2023-0848
Oracle Linux 8 php-pecl-xdebug 2.9.5-1.module+el8.3.0+7685+72d70b58 ELSA-2023-2903
Oracle Linux 8 php-pecl-xdebug3 3.1.2-1.module+el8.6.0+20568+84712317 ELSA-2023-0848
Oracle Linux 8 php-pecl-zip 1.18.2-1.module+el8.3.0+7685+72d70b58 ELSA-2023-2903, ELSA-2023-0848

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 1 repository

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Advisories 41

References