Critical Vulnerability in p7zip: Error Handling Flaw in xz File Processing

p7zip Updated 02 Oct 2025

Summary

19/04/2025
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2022-47112: 7-Zip 22.01 does not report an error for certain invalid xz files, involving stream flags and reserved bits. Some later versions are unaffected. Affects p7zip versions < 16.02+transitional.1. Fixed in 16.02+transitional.1. 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 Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

p7zip is a command-line version of 7-Zip, a popular file archiver that supports various compression formats. It is widely used for compressing and decompressing files, providing high compression ratios and strong encryption capabilities. However, certain versions of p7zip, specifically 22.01, exhibit a vulnerability where invalid xz files do not trigger error reporting, potentially leading to data integrity issues.

Vulnerability Detail

The vulnerability arises from p7zip's failure to report errors for specific invalid xz files, particularly concerning stream flags and reserved bits. This oversight can result in the application processing corrupted or malformed files without alerting the user, which may lead to unexpected behavior or data loss. The issue is present in version 22.01, but later versions have addressed this flaw.

How To Fix

Minimum fixed version

16.02+transitional.1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade p7zip

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

Workaround

As a temporary workaround, users can manually verify the integrity of xz files before processing them with p7zip. This can be done using alternative tools that provide better error handling for xz files.

Conclusion

The vulnerability in p7zip highlights a critical issue with error handling in specific xz files, which can lead to significant data integrity risks. Users are advised to update to the latest patched version to mitigate these risks and ensure the reliability of their file processing.

See every vulnerability recorded for p7zip →

Share this vulnerability

FAQ

The vulnerability involves the failure to report errors for certain invalid xz files, which can lead to data integrity issues.

Version 22.01 of p7zip is affected by this vulnerability.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

Update p7zip to version 16.02+transitional.1 using the command 'sudo apt-get install p7zip'.

Yes, a temporary workaround is to manually verify the integrity of xz files before processing them with p7zip.

Related vulnerabilities

Recent vulnerabilities recorded for p7zip.

How To Fix

Minimum fixed version

16.02+transitional.1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade p7zip

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