Every CVE Search/ Get API key

CVE-2021-45261

An Invalid Pointer vulnerability exists in GNU patch 2.7 via the another_hunk function, which...

5.5 MediumFix available

An Invalid Pointer vulnerability exists in GNU patch 2.7 via the another_hunk function, which causes a Denial of Service.

Attack profile

How easy it is to exploit

Attack vector
Local
Complexity
Low
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
High

Exploit likelihood

0.76%Up 0.2 points since Dec 23, 2021
90%50%10%1%

What each source reports

NVD Score used 5.5

An Invalid Pointer vulnerability exists in GNU patch 2.7 via the another_hunk function, which causes a Denial of Service.

Record
CVE-2021-45261
CVSS 3.1
5.5 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
CVSS 2.0
4.3 MediumAV:N/AC:M/Au:N/C:N/I:N/A:P
Weakness
CWE-763
Updated
2026-11-02
CVE List No score

An Invalid Pointer vulnerability exists in GNU patch 2.7 via the another_hunk function, which causes a Denial of Service.

Record
CVE-2021-45261
Updated
2026-11-02
EUVDEUVD-2021-32041 No score

An Invalid Pointer vulnerability exists in GNU patch 2.7 via the another_hunk function, which causes a Denial of Service.

Record
EUVD-2021-32041
Updated
2026-11-03
GitHub AdvisoriesGHSA-5wqw-cqhv-q8cv No score

An Invalid Pointer vulnerability exists in GNU patch 2.7 via the another_hunk function, which...

An Invalid Pointer vulnerability exists in GNU patch 2.7 via the another_hunk function, which causes a Denial of Service.

Record
GHSA-5wqw-cqhv-q8cv
Weakness
CWE-763
Updated
2026-11-02
OSV 5.5

An Invalid Pointer vulnerability exists in GNU patch 2.7 via the another_hunk function, which causes a Denial of Service.

Record
CVE-2021-45261
CVSS 3.1
5.5 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVDEBIAN-CVE-2021-45261 5.5

An Invalid Pointer vulnerability exists in GNU patch 2.7 via the another_hunk function, which causes a Denial of Service.

Record
DEBIAN-CVE-2021-45261
CVSS 3.1
5.5 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Updated
2026-11-02
Show 11 moreShow less
OSVUBUNTU-CVE-2021-45261 5.5

An Invalid Pointer vulnerability exists in GNU patch 2.7 via the another_hunk function, which causes a Denial of Service.

Record
UBUNTU-CVE-2021-45261
CVSS 3.1
5.5 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVCLSA-2026-1788355583 No score

patch: Fix of CVE-2021-45261

  • CVE-2021-45261: clear the range of p_line[] pointers in another_hunk() before they are used and freed, instead of advancing p_end past uninitialised entries (SUSE vendor fix; no upstream fix exists)
Record
CLSA-2026-1788355583
Updated
2026-11-02
OSVopenSUSE-SU-2026:10140-1 No score

patch-2.8-2.1 on GA media

These are all security issues fixed in the patch-2.8-2.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2026:10140-1
Updated
2026-11-02
OSVopenSUSE-SU-2026:20227-1 No score

Security update for patch

This update for patch fixes the following issues:

  • CVE-2021-45261: invalid pointer via another_hunk function can cause a denial-of-service (bsc#1194037).
Record
openSUSE-SU-2026:20227-1
Updated
2026-11-02
OSVROOT-OS-DEBIAN-12-CVE-2021-45261 No score

CVE-2021-45261 in patch - Patched by Root

Root has patched CVE-2021-45261 in the patch package for Root:Debian:12. Multiple fixed versions available.

Record
ROOT-OS-DEBIAN-12-CVE-2021-45261
Updated
2026-11-02
OSVSUSE-SU-2026:0781-1 No score

Security update for patch

This update for patch fixes the following issues:

  • CVE-2021-45261: Clear range of pointers before they are used/freed (bsc#1194037).
Record
SUSE-SU-2026:0781-1
Updated
2026-11-02
OSVSUSE-SU-2026:20343-1 No score

Security update for patch

This update for patch fixes the following issues:

  • CVE-2021-45261: invalid pointer via another_hunk function can cause a denial-of-service (bsc#1194037).
Record
SUSE-SU-2026:20343-1
Updated
2026-11-02
OSVSUSE-SU-2026:20431-1 No score

Security update for patch

This update for patch fixes the following issues:

  • CVE-2021-45261: invalid pointer via another_hunk function can cause a denial-of-service (bsc#1194037).
Record
SUSE-SU-2026:20431-1
Updated
2026-11-02
OSVSUSE-SU-2026:22905-1 No score

Security update for patch

This update for patch fixes the following issues

  • CVE-2021-45261: Invalid Pointer via another_hunk function (bsc#1194037).
  • CVE-2026-56288: crafted unified-diff patch file can cause null pointer derefence (bsc#1271167).
  • CVE-2026-56289: improper validation of hunk line offsets can lead to denial of service (bsc#1271166).
Record
SUSE-SU-2026:22905-1
Updated
2026-11-02
OSVSUSE-SU-2026:23210-1 No score

Security update for patch

This update for patch fixes the following issues

  • CVE-2021-45261: Invalid Pointer via another_hunk function (bsc#1194037).
  • CVE-2026-56288: crafted unified-diff patch file can cause null pointer derefence (bsc#1271167).
  • CVE-2026-56289: improper validation of hunk line offsets can lead to denial of service (bsc#1271166).
Record
SUSE-SU-2026:23210-1
Updated
2026-11-02
OSVSUSE-SU-2026:2922-1 No score

Security update for patch

This update for patch fixes the following issues

  • CVE-2021-45261: Invalid Pointer via another_hunk function (bsc#1194037).
  • CVE-2026-56288: crafted unified-diff patch file can cause null pointer derefence (bsc#1271167).
  • CVE-2026-56289: improper validation of hunk line offsets can lead to denial of service (bsc#1271166).
Record
SUSE-SU-2026:2922-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
patch
TuxCare:AlmaLinux:9.2
before 2.7.6-16.el9_2.tuxcare.els2
2.7.6-16.el9_2.tuxcare.els2
patch
Debian:12
All versions, plus listed versions
2.7.6-72.8-12.8-2
None known
patch
Debian:13
All versions, plus listed versions
2.8-2
None known
patch
Debian:14
All versions, plus listed versions
2.8-2
None known
patch
Root:Debian:12
before 2.7.6-7.aikido.7
2.7.6-7.aikido.72.7.6-7.root.io.52.7.6-7.root.io.6
rootio-patch
Root:Debian:12
before 2.7.6-7.aikido.7
2.7.6-7.aikido.72.7.6-7.root.io.52.7.6-7.root.io.6
patch
SUSE:Linux Enterprise Module for Basesystem 15 SP7
before 2.7.6-150000.5.9.1
2.7.6-150000.5.9.1
patch
openSUSE:Leap 15.6
before 2.7.6-150000.5.9.1
2.7.6-150000.5.9.1
patch
SUSE:Linux Micro 6.2
before 2.7.6-160000.3.1
2.7.6-160000.3.1
patch
SUSE:Linux Enterprise Server 16.0
before 2.7.6-160000.3.1
2.7.6-160000.3.1
Show 15 moreShow less
Affected packages
PackageAffectedFixed
patch
SUSE:Linux Enterprise Server for SAP applications 16.0
before 2.7.6-160000.3.1
2.7.6-160000.3.1
patch
SUSE:Linux Micro 6.1
From an advisory covering 3 CVEs
before 2.7.6-slfo.1.1_2.1
2.7.6-slfo.1.1_2.1
patch
SUSE:Linux Micro 6.0
From an advisory covering 3 CVEs
before 2.7.6-4.1
2.7.6-4.1
patch
SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5
From an advisory covering 3 CVEs
before 2.7.5-8.14.1
2.7.5-8.14.1
patch
Ubuntu:Pro:14.04:LTS
All versions, plus listed versions
2.7.1-32.7.1-42.7.1-4ubuntu12.7.1-4ubuntu22.7.1-4ubuntu2.32.7.1-4ubuntu2.42.7.1-4ubuntu2.4+esm1
None known
patch
Ubuntu:16.04:LTS
All versions, plus listed versions
2.7.5-12.7.5-1ubuntu0.16.04.12.7.5-1ubuntu0.16.04.2
None known
patch
Ubuntu:18.04:LTS
All versions, plus listed versions
2.7.5-1build12.7.6-12.7.6-2ubuntu12.7.6-2ubuntu1.1
None known
patch
Ubuntu:20.04:LTS
All versions, plus listed versions
2.7.6-6
None known
patch
Ubuntu:22.04:LTS
All versions, plus listed versions
2.7.6-72.7.6-7build12.7.6-7build2
None known
patch
Ubuntu:24.04:LTS
All versions, plus listed versions
2.7.6-7build22.7.6-7build3
None known
patch
Ubuntu:25.10
All versions, plus listed versions
2.7.6-7build32.8-12.8-2
None known
patch
Ubuntu:26.10
All versions, plus listed versions
2.8-2build1
None known
patch
Ubuntu:26.04:LTS
All versions, plus listed versions
2.8-22.8-2build1
None known
patch
openSUSE:Tumbleweed
before 2.8-2.1
2.8-2.1
patch
openSUSE:Leap 16.0
before 2.7.6-160000.3.1
2.7.6-160000.3.1

History

History
RecordedChangedSources
affected, facts
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-45261 is a medium vulnerability (CVSS 5.5) in Gnu Patch, published December 22, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.76%, the 55th percentile. Fixed in patch 2.7.6-16.el9_2.tuxcare.els2.

References

Show 13 moreShow less
MoveEnter Open