Out-of-Bounds Access Vulnerability in GNU Patch Package - CVE-2016-10713

patch Updated 02 Oct 2025

Summary

13/02/2018
N/A
Yes i
Medium
5.5

ALPINE-CVE-2016-10713: An issue was discovered in GNU patch before 2.7.6. Out-of-bounds access within pch_write_line() in pch.c can possibly lead to DoS via a crafted input file. Affects patch versions < 2.7.5-r3. Fixed in 2.7.5-r3. 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

The GNU Patch package is a widely used utility that allows users to apply changes to files using patch files. It is essential for software development and version control, enabling developers to manage changes efficiently. However, certain versions of this package are vulnerable to an out-of-bounds access issue, which can lead to denial of service (DoS) attacks when processing crafted input files.

Vulnerability Detail

An issue was discovered in GNU Patch before version 2.7.6, specifically within the pch_write_line() function in pch.c. This vulnerability allows for out-of-bounds access, which can potentially lead to a denial of service (DoS) condition when a maliciously crafted input file is processed. The vulnerability is significant as it can disrupt the functionality of applications relying on the patch utility, making them unresponsive or crashing them entirely.

How To Fix

Minimum fixed version

2.7.5-r3

This is the first release that contains the fix.

sudo apk add --upgrade patch

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

Workaround

If updating the package is not immediately possible, a temporary workaround is to avoid processing untrusted or crafted patch files until the package is updated. This can help mitigate the risk of exploitation.

Conclusion

The CVE-2016-10713 vulnerability in the GNU Patch package poses a significant risk of denial of service due to out-of-bounds access. It is crucial for users to update to the patched version to ensure the security and stability of their applications. Utilizing tools like Vulert can aid in monitoring for such vulnerabilities effectively.

See every vulnerability recorded for patch →

Share this vulnerability

FAQ

CVE-2016-10713 is a vulnerability in the GNU Patch package that allows for out-of-bounds access, potentially leading to denial of service.

Versions of GNU Patch prior to 2.7.6 are affected by this vulnerability.

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 by this vulnerability.

The vulnerability can lead to denial of service, causing applications that rely on the patch utility to become unresponsive or crash.

Yes, temporarily avoid processing untrusted or crafted patch files until the package is updated to mitigate the risk.

Related vulnerabilities

Recent vulnerabilities recorded for patch.

How To Fix

Minimum fixed version

2.7.5-r3

This is the first release that contains the fix.

sudo apk add --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