Directory Traversal Vulnerability in diffoscope: Potential Disclosure of Sensitive Files

diffoscope Updated 02 Oct 2025

Summary

27/02/2024
N/A
No i
High
7.5

CVE-2024-25711: diffoscope before 256 allows directory traversal via an embedded filename in a GPG file. Affects diffoscope versions 177 – 302. No fix is published. 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

diffoscope is a tool designed to compare files and directories, providing detailed output on differences. It is widely used in software development and security auditing to identify changes between versions of files. The tool supports various file formats, including GPG files, which can contain sensitive information. The vulnerability in question arises from the handling of embedded filenames in GPG files, which can lead to unauthorized access to sensitive files on the system.

Vulnerability Detail

The vulnerability, identified as CVE-2024-25711, allows for directory traversal through an embedded filename in a GPG file. This occurs because the gpg --use-embedded-filenames option is trusted without proper validation. An attacker can exploit this vulnerability to access sensitive files, such as private SSH keys located in directories like ../.ssh/id_rsa. The potential ramifications include unauthorized access to sensitive data, which could lead to further exploitation of the affected system.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, users can avoid using GPG files with embedded filenames until the software is updated. Additionally, restricting access to sensitive files and monitoring for unauthorized access attempts can help mitigate the risk.

Conclusion

The directory traversal vulnerability in diffoscope (CVE-2024-25711) poses a significant risk by allowing unauthorized access to sensitive files through improperly validated embedded filenames in GPG files. Users are strongly advised to upgrade to version 256 or later to mitigate this risk.

See every vulnerability recorded for diffoscope →

Share this vulnerability

FAQ

CVE-2024-25711 is a vulnerability in diffoscope that allows directory traversal via an embedded filename in a GPG file, potentially disclosing sensitive files.

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

If an immediate upgrade is not possible, avoid using GPG files with embedded filenames and restrict access to sensitive files as a temporary measure.

Files such as private SSH keys, configuration files, and other sensitive documents located in accessible directories could be exposed.

Yes, if an attacker can manipulate GPG files processed by diffoscope, they could exploit this vulnerability to access sensitive files remotely.

Related vulnerabilities

Recent vulnerabilities recorded for diffoscope.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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