GNU Patch Symlink Handling Vulnerability in Debian Packages

patch Updated 02 Oct 2025

Summary

17/07/2019
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2019-13636: In GNU patch through 2.7.6, the following of symlinks is mishandled in certain cases other than input files. This affects inp.c and util.c. Affects patch versions < 2.7.6-5. Fixed in 2.7.6-5. 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 'patch' package in Debian is a utility that allows users to apply changes to files using diff files. It is widely used in software development for managing changes in source code. The package is critical for maintaining version control and ensuring that updates can be applied smoothly. However, a vulnerability has been identified in versions up to 2.7.6, which affects its handling of symbolic links, potentially leading to unintended file manipulations.

Vulnerability Detail

In GNU patch through version 2.7.6, there is a mishandling of symlinks in certain cases beyond just input files. This flaw is present in the source files inp.c and util.c, which could allow an attacker to exploit the vulnerability to manipulate files in ways that were not intended by the user. The ramifications of this vulnerability could include unauthorized access to sensitive files or the corruption of important data.

How To Fix

Minimum fixed version

2.7.6-5

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 using symlinks in their patch files until the package is updated. Additionally, users can manually inspect and verify the integrity of files before applying patches to ensure that no unintended changes occur.

Conclusion

The GNU patch vulnerability presents a significant risk for users of Debian packages, particularly those using versions up to 2.7.6. It is crucial for users to update their packages to the latest fixed version to mitigate potential risks. Utilizing tools like Vulert can further enhance security by providing real-time monitoring for vulnerabilities.

See every vulnerability recorded for patch →

Share this vulnerability

FAQ

The vulnerability involves mishandling of symlinks, which could lead to unauthorized file manipulations.

You can use the Vulert platform to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected.

Update the 'patch' package to version 2.7.6-5 or later using the command 'sudo apt-get update && sudo apt-get install patch'.

While specific exploits have not been publicly disclosed, the nature of the vulnerability suggests that it could be leveraged for unauthorized access or data corruption.

Vulert is a service that monitors open-source vulnerabilities in your software using a manifest file like package-lock.json. It provides real-time alerts for vulnerabilities without requiring code access.

Related vulnerabilities

Recent vulnerabilities recorded for patch.

How To Fix

Minimum fixed version

2.7.6-5

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