Directory Traversal Vulnerability in GNU Patch Package

patch Updated 02 Oct 2025

Summary

25/11/2019
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2015-1396: A Directory Traversal vulnerability exists in the GNU patch before 2.7.4. Affects patch versions < 2.7.3-1. Fixed in 2.7.3-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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The GNU Patch package is a widely used utility that allows users to apply changes to files and directories based on a patch file. It is essential for developers and system administrators who need to manage source code changes efficiently. However, certain versions of this package are vulnerable to a Directory Traversal attack, which can lead to unauthorized file access and modifications.

Vulnerability Detail

A Directory Traversal vulnerability exists in the GNU patch before version 2.7.4. This vulnerability allows a remote attacker to exploit a symlink attack in a patch file, enabling them to write to arbitrary files on the system. The issue arises from an incomplete fix for CVE-2015-1196, making it critical for users to address this vulnerability to prevent potential data breaches and system compromises.

How To Fix

Minimum fixed version

2.7.3-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade patch

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

Workaround

As a temporary workaround, users can avoid applying patch files from untrusted sources and ensure that proper file permissions are set to limit access to sensitive files.

Conclusion

The Directory Traversal vulnerability in the GNU Patch package poses a significant risk to systems using affected versions. It is crucial for users to update to the patched version to safeguard their systems against potential attacks. By following the recommended steps and utilizing tools like Vulert, users can effectively monitor and manage vulnerabilities in their software.

See every vulnerability recorded for patch →

Share this vulnerability

FAQ

A Directory Traversal vulnerability allows an attacker to access files and directories that are outside the intended directory structure, potentially leading to unauthorized access to sensitive data.

You can check if your application is affected by using the Vulert playground at Vulert Scanner, which allows you to monitor and alert for open-source vulnerabilities without requiring any installation.

Failing to fix this vulnerability could allow attackers to manipulate files on your system, leading to data loss, corruption, or unauthorized access to sensitive information.

Yes, you can mitigate the risk by avoiding the use of untrusted patch files and ensuring that your file permissions are properly configured to restrict access.

More information can be found in the official CVE database and security advisories related to the GNU Patch package.

Related vulnerabilities

Recent vulnerabilities recorded for patch.

How To Fix

Minimum fixed version

2.7.3-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade patch

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