Directory Traversal Vulnerability in dpkg Package Manager

dpkg Updated 02 Oct 2025

Summary

26/05/2022
N/A
Yes i
Critical
9.8

CVE-2022-1664: 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. Affects dpkg across 5 version ranges.

< 1.20.10-r0 < 1f23dddc17f69c9598477098c7fb9936e15fa495 < 7a6c03cb34d4a09f35df2f10779cbf1b70a5200b < 58814cacee39c4ce9e2cd0e3a3b9b57ad437eff5 < faa4c92debe45412bfcf8a44f26e827800bb24be

Fixed in 1.20.10-r0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

The dpkg package management system is widely used in Debian-based Linux distributions for installing, upgrading, and removing software packages. It is responsible for handling the installation and maintenance of packages, including their dependencies. The vulnerability identified as CVE-2022-1664 affects versions of dpkg prior to 1.21.8, 1.20.10, 1.19.8, and 1.18.26. This vulnerability specifically targets the extraction of untrusted source packages in v2 and v3 source package formats that include a debian.tar. Exploiting this vulnerability can lead to directory traversal situations when processing specially crafted orig.tar and debian.tar tarballs.

Vulnerability Detail

The directory traversal vulnerability in dpkg's Dpkg::Source::Archive module allows an attacker to manipulate the extraction process of untrusted source packages. By crafting malicious orig.tar and debian.tar tarballs, an attacker can trick dpkg into extracting files to unintended directories outside the intended extraction path. This can result in arbitrary file overwrites, unauthorized access to sensitive files, and potential remote code execution. The vulnerability has a CVSSv3 score of 9.8, indicating its critical severity.

How To Fix

Minimum fixed version

1.20.10-r0

This is the first release that contains the fix.

sudo apk add --upgrade dpkg

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can exercise caution when handling untrusted source packages. It is advisable to verify the integrity and authenticity of source packages before extraction. Additionally, users can consider implementing strict file permissions and access controls to limit the impact of a potential exploitation. However, applying the official fix by updating dpkg is the recommended long-term solution.

Conclusion

The directory traversal vulnerability in dpkg poses a significant risk to systems using vulnerable versions of the package manager. It is crucial to promptly update dpkg to the patched versions to mitigate the risk of arbitrary file overwrites, unauthorized access, and potential remote code execution. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for dpkg →

Share this vulnerability

FAQ

dpkg is a package management system used in Debian-based Linux distributions, responsible for installing, upgrading, and removing software packages.

Exploiting this vulnerability can lead to arbitrary file overwrites, unauthorized access to sensitive files, and potential remote code execution.

To fix this vulnerability, update dpkg to the patched versions: 1.21.8, 1.20.10, 1.19.8, or 1.18.26, depending on your distribution and version.

As a temporary workaround, exercise caution when handling untrusted source packages and consider implementing strict file permissions and access controls.

The CVSSv3 score of this vulnerability is 9.8, indicating its critical severity.

Related vulnerabilities

Recent vulnerabilities recorded for dpkg.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

1.20.10-r0

This is the first release that contains the fix.

sudo apk add --upgrade dpkg

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback