CVE-2025-6297
Linux Debian vulnerability analysis and mitigation

Overview

A vulnerability was discovered in dpkg-deb that does not properly sanitize directory permissions when extracting a control member into a temporary directory. This operation is documented as being safe even on untrusted data. The vulnerability was discovered in July 2025 and affects the dpkg package management system (DPKG Commit).

Technical details

The vulnerability stems from the cleanup code not sanitizing directory permissions during the extraction of control members into temporary directories. The issue has been present since the initial commit introducing dpkg-deb in C. The vulnerability has been assigned a CVSS v3.1 Base Score of 8.2 (HIGH) with the vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N. It is categorized under CWE-400 (Uncontrolled Resource Consumption) and CWE-732 (Incorrect Permission Assignment for Critical Resource) (NVD Database).

Impact

When exploited, this vulnerability can result in leaving temporary files behind during cleanup operations. In scenarios involving automated and repeated execution of dpkg-deb commands on adversarial .deb packages or with well-compressible files placed inside a directory with permissions not allowing removal by a non-root user, this can lead to a denial of service (DoS) condition through disk quota exhaustion or disk full conditions (DPKG Commit).

Mitigation and workarounds

A fix has been implemented that involves adding proper directory permission sanitization during the cleanup process. The fix includes a new function cuinfotreewalkfixupdir that ensures proper permissions (0755) are set on directories before cleanup. This patch has been marked as a stable candidate for versions 1.20.x, 1.21.x, and 1.22.x (DPKG Commit).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management