CVE-2022-2255 Incorrect header handling in mod-wsgi

High 7.5 Published Updated

Attackers can spoof client IP addresses by injecting X-Client-IP headers, bypassing IP-based security controls in WSGI applications.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-2255?

CVE-2022-2255 is a high-severity vulnerability in Debian Debian Linux, published on 25 Aug 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

A vulnerability was found in mod_wsgi. The X-Client-IP header is not removed from a request from an untrusted proxy, allowing an attacker to pass the X-Client-IP header to the target WSGI application because the condition to remove it is missing.

Weakness: CWE-345, CWE-348

Which versions are affected by CVE-2022-2255?

4 open source packages ship an affected version, including mod-wsgi and mod_wsgi. It affects 2 products.

PackageAffectedFixed in
mod-wsgi PyPIAll versions4.9.3
mod-wsgi PyPIAll versions4.9.3
mod-wsgi PyPIAll versions4.9.3
mod_wsgi BitnamiAll versions4.9.3
Linux distribution packages (36)
python39 AlmaLinux:8All versions3.9.20-1.module_el8.10.0+3902+1690be06
python39-PyMySQL AlmaLinux:8All versions0.10.1-2.module_el8.6.0+2780+a40f65e1
python39-cffi AlmaLinux:8All versions1.14.3-2.module_el8.6.0+2780+a40f65e1
python39-cffi AlmaLinux:8All versions1.14.3-2.module_el8.6.0+3248+c431e88c
python39-chardet AlmaLinux:8All versions3.0.4-19.module_el8.6.0+2780+a40f65e1
python39-cryptography AlmaLinux:8All versions3.3.1-3.module_el8.10.0+3765+2f9a457d
python39-devel AlmaLinux:8All versions3.9.20-1.module_el8.10.0+3902+1690be06
python39-idle AlmaLinux:8All versions3.9.20-1.module_el8.10.0+3902+1690be06
python39-idna AlmaLinux:8All versions2.10-4.module_el8.10.0+3849+a48d89aa
python39-libs AlmaLinux:8All versions3.9.20-1.module_el8.10.0+3902+1690be06
python39-lxml AlmaLinux:8All versions4.6.5-1.module_el8.6.0+2780+a40f65e1
python39-lxml AlmaLinux:8All versions4.6.5-1.module_el8.6.0+3248+c431e88c
python39-mod_wsgi AlmaLinux:8All versions4.7.1-7.module_el8.10.0+3989+a618fe15.1
python39-numpy AlmaLinux:8All versions1.19.4-3.module_el8.6.0+2780+a40f65e1
python39-numpy AlmaLinux:8All versions1.19.4-3.module_el8.6.0+3248+c431e88c
python39-numpy-doc AlmaLinux:8All versions1.19.4-3.module_el8.6.0+2780+a40f65e1
python39-numpy-f2py AlmaLinux:8All versions1.19.4-3.module_el8.6.0+2780+a40f65e1
python39-numpy-f2py AlmaLinux:8All versions1.19.4-3.module_el8.6.0+3248+c431e88c
python39-pip AlmaLinux:8All versions20.2.4-9.module_el8.10.0+3765+2f9a457d
python39-pip-wheel AlmaLinux:8All versions20.2.4-9.module_el8.10.0+3765+2f9a457d
python39-ply AlmaLinux:8All versions3.11-10.module_el8.6.0+2780+a40f65e1
python39-psutil AlmaLinux:8All versions5.8.0-4.module_el8.6.0+2780+a40f65e1
python39-psutil AlmaLinux:8All versions5.8.0-4.module_el8.6.0+3248+c431e88c
python39-psycopg2 AlmaLinux:8All versions2.8.6-3.module_el8.10.0+3765+2f9a457d
python39-psycopg2-doc AlmaLinux:8All versions2.8.6-3.module_el8.10.0+3765+2f9a457d
python39-psycopg2-tests AlmaLinux:8All versions2.8.6-3.module_el8.10.0+3765+2f9a457d
python39-pycparser AlmaLinux:8All versions2.20-3.module_el8.6.0+2780+a40f65e1
python39-pysocks AlmaLinux:8All versions1.7.1-4.module_el8.6.0+2780+a40f65e1
python39-pyyaml AlmaLinux:8All versions5.4.1-1.module_el8.6.0+2780+a40f65e1
python39-pyyaml AlmaLinux:8All versions5.4.1-1.module_el8.6.0+3248+c431e88c
python39-requests AlmaLinux:8All versions2.25.0-3.module_el8.9.0+3634+fb2a896c
python39-rpm-macros AlmaLinux:8All versions3.9.20-1.module_el8.10.0+3902+1690be06
python39-scipy AlmaLinux:8All versions1.5.4-5.module_el8.9.0+3634+fb2a896c
python39-setuptools AlmaLinux:8All versions50.3.2-6.module_el8.10.0+3885+d986a391
python39-setuptools-wheel AlmaLinux:8All versions50.3.2-6.module_el8.10.0+3885+d986a391
python39-six AlmaLinux:8All versions1.15.0-3.module_el8.6.0+2780+a40f65e1

Products include Debian Debian Linux, Modwsgi Mod Wsgi.

How do I fix CVE-2022-2255?

Upgrade mod-wsgi to 4.9.3 or later.

Is CVE-2022-2255 being exploited?

There is no known exploitation of CVE-2022-2255 in the wild and no public exploit code.

All Debian Debian Linux vulnerabilities

Sources

Also known as ALSA-2025:4791, AZL-10734, BIT-mod_wsgi-2022-2255, DEBIAN-CVE-2022-2255, DLA-3111-1, GHSA-7527-8855-9cf8 and 11 more.

Is CVE-2022-2255 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free