DpkgApplication · Debian

CVE-2025-6297

HIGH · 8.2 CVSS v3.1 Published 2025-07-01
Fix available
A fix is available. Upgrade to 1.22.21 or later.
See remediation →
91/100
Remediation priority · Urgent
Remotely reachable No privileges Zero-click Patch available

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
It was discovered that dpkg-deb does not properly sanitize directory permissions when extracting a control member into a temporary directory, which is documented as being a safe operation even on untrusted data. This may result in leaving temporary files behind on cleanup. Given 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 end up in a DoS scenario due to causing disk quota exhaustion or disk full conditions.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

dpkg-deb fails to sanitize directory permissions when extracting the control member into a temporary directory, which is documented as safe for untrusted data. This allows temporary files to persist after cleanup when placed in directories where non-root users cannot remove files. Repeated automated processing of adversarial .deb packages can fill disk space, causing DoS.

MitigationAvoid processing untrusted .deb packages with dpkg-deb in automated pipelines; monitor disk usage; apply upstream patch when available.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
DpkgApplication
Affected:< 1.22.21

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
Low
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Check installed dpkg version
    Run `dpkg --version` or `dpkg-deb --version` to get the version number
    Affected if The version is lower than 1.22.21
  2. Identify automated .deb processing pipelines
    Search for scripts or cron jobs that call dpkg-deb extract, -info, or -control on .deb files from untrusted sources
    Affected if Automated pipelines process .deb packages without manual review
  3. Look for orphaned dpkg-deb temporary files
    Check /tmp and /var/tmp for files matching patterns like `dpkg-deb*` or `control.tar.*` that may have been left behind after extraction
    Affected if Stale temporary files exist from previous dpkg-deb operations
  4. Verify temp directory permissions
    Check if the directories used for dpkg-deb extraction (check $TMPDIR, /tmp, /var/tmp) have sticky bit set and are writable by non-root users
    Affected if Temp directories lack proper permissions for safe untrusted data handling
  5. Check disk usage in temp directories
    Run `df -h /tmp /var/tmp` or `du -sh /tmp/*` to see if temp directories have grown unexpectedly
    Affected if Disk space in temp directories is unusually high relative to expected activity

You are affected if dpkg version is below 1.22.21 AND you process untrusted .deb packages in automated pipelines where temp files can accumulate without cleanup.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 1.22.21 or later
Fixed in 1.22.21
Vendor patch git.dpkg.org →
Interim mitigation

Avoid processing untrusted .deb packages with dpkg-deb in automated pipelines; monitor disk usage; apply upstream patch when available.

Recommended fix High confidence

dpkg 1.22.21

  1. Check current dpkg version with: dpkg --version
  2. Upgrade dpkg to version 1.22.21 or later using your system's package manager (e.g., apt-get update && apt-get install dpkg)
  3. Verify the installed version is 1.22.21 or higher: dpkg --version

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Dpkg Scoped from the published advisory
  • Consultation4.0 h
  • Implementation16.0 h
  • Testing8.0 h
  • Review / QA4.0 h
32.0 hours of engineering $5,600
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $8,960.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2025-6297 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2025-6297 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data