CVE-2022-1664 directory traversal for in-place extracts with untrusted v2 and v3 source packages with debian.tar

Critical 9.8 Published Updated

Attackers can exploit directory traversal in dpkg source package extraction to write files outside intended directories, potentially leading to code execution.

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-1664?

CVE-2022-1664 is a critical path traversal vulnerability in Debian Debian Linux, published on 26 May 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Dpkg::Source::Archive in dpkg, the Debian package management system, before version 1.21.8, 1.20.10, 1.19.8, 1.18.26 is prone to a directory traversal vulnerability. When extracting untrusted source packages in v2 and v3 source package formats that include a debian.tar, the in-place extraction can lead to directory traversal situations on specially crafted orig.tar and debian.tar tarballs.

Weakness: CWE-22

Which versions are affected by CVE-2022-1664?

It affects 3 products.

Linux distribution packages (40)
dpkg SUSE:Enterprise Storage 6All versions1.19.0.4-150000.4.4.1
update-alternatives SUSE:Enterprise Storage 6All versions1.19.0.4-150000.4.4.1
dpkg SUSE:Enterprise Storage 7All versions1.19.0.4-150000.4.4.1
update-alternatives SUSE:Enterprise Storage 7All versions1.19.0.4-150000.4.4.1
dpkg SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOSAll versions1.19.0.4-150000.4.4.1
update-alternatives SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOSAll versions1.19.0.4-150000.4.4.1
dpkg SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSSAll versions1.19.0.4-150000.4.4.1
update-alternatives SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSSAll versions1.19.0.4-150000.4.4.1
dpkg SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOSAll versions1.19.0.4-150000.4.4.1
update-alternatives SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOSAll versions1.19.0.4-150000.4.4.1
dpkg SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSSAll versions1.19.0.4-150000.4.4.1
update-alternatives SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSSAll versions1.19.0.4-150000.4.4.1
dpkg SUSE:Linux Enterprise High Performance Computing 15-ESPOSAll versions1.19.0.4-150000.4.4.1
update-alternatives SUSE:Linux Enterprise High Performance Computing 15-ESPOSAll versions1.19.0.4-150000.4.4.1
dpkg SUSE:Linux Enterprise High Performance Computing 15-LTSSAll versions1.19.0.4-150000.4.4.1
update-alternatives SUSE:Linux Enterprise High Performance Computing 15-LTSSAll versions1.19.0.4-150000.4.4.1
update-alternatives SUSE:Linux Enterprise Micro 5.1All versions1.19.0.4-150000.4.4.1
update-alternatives SUSE:Linux Enterprise Micro 5.2All versions1.19.0.4-150000.4.4.1
update-alternatives SUSE:Linux Enterprise Micro 5.3All versions1.19.0.4-150000.4.4.1
update-alternatives SUSE:Linux Enterprise Module for Basesystem 15 SP3All versions1.19.0.4-150000.4.4.1
update-alternatives SUSE:Linux Enterprise Module for Basesystem 15 SP4All versions1.19.0.4-150000.4.4.1
dpkg SUSE:Linux Enterprise Module for Development Tools 15 SP3All versions1.19.0.4-150000.4.4.1
dpkg SUSE:Linux Enterprise Module for Development Tools 15 SP4All versions1.19.0.4-150000.4.4.1
update-alternatives SUSE:Linux Enterprise Server 12 SP5All versions1.18.4-16.3.5
dpkg SUSE:Linux Enterprise Server 15 SP1-BCLAll versions1.19.0.4-150000.4.4.1
update-alternatives SUSE:Linux Enterprise Server 15 SP1-BCLAll versions1.19.0.4-150000.4.4.1
dpkg SUSE:Linux Enterprise Server 15 SP1-LTSSAll versions1.19.0.4-150000.4.4.1
update-alternatives SUSE:Linux Enterprise Server 15 SP1-LTSSAll versions1.19.0.4-150000.4.4.1
dpkg SUSE:Linux Enterprise Server 15 SP2-BCLAll versions1.19.0.4-150000.4.4.1
update-alternatives SUSE:Linux Enterprise Server 15 SP2-BCLAll versions1.19.0.4-150000.4.4.1
dpkg SUSE:Linux Enterprise Server 15 SP2-LTSSAll versions1.19.0.4-150000.4.4.1
update-alternatives SUSE:Linux Enterprise Server 15 SP2-LTSSAll versions1.19.0.4-150000.4.4.1
dpkg SUSE:Linux Enterprise Server 15-LTSSAll versions1.19.0.4-150000.4.4.1
update-alternatives SUSE:Linux Enterprise Server 15-LTSSAll versions1.19.0.4-150000.4.4.1
update-alternatives SUSE:Linux Enterprise Server for SAP Applications 12 SP5All versions1.18.4-16.3.5
dpkg SUSE:Linux Enterprise Server for SAP Applications 15All versions1.19.0.4-150000.4.4.1
update-alternatives SUSE:Linux Enterprise Server for SAP Applications 15All versions1.19.0.4-150000.4.4.1
dpkg SUSE:Linux Enterprise Server for SAP Applications 15 SP1All versions1.19.0.4-150000.4.4.1
update-alternatives SUSE:Linux Enterprise Server for SAP Applications 15 SP1All versions1.19.0.4-150000.4.4.1
dpkg SUSE:Linux Enterprise Server for SAP Applications 15 SP2All versions1.19.0.4-150000.4.4.1

Products include Debian Debian Linux, Debian Dpkg, Netapp Ontap Select Deploy Administration Utility.

How do I fix CVE-2022-1664?

Upgrade to a fixed version.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2022-1664 being exploited?

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

All Debian Debian Linux vulnerabilities

Sources

Also known as ALPINE-CVE-2022-1664, AZL-9853, CLSA-2022-1654717100, DEBIAN-CVE-2022-1664, DLA-3022-1, DSA-5147-1 and 9 more.

Is CVE-2022-1664 in your software?

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

Check your SBOMs for free