cve.bz

CVE-2021-20294 gnu binutils: Out-of-bounds Write

7.8 highExploit referenceEPSS 3.3%Fix available

High (7.8) in gnu binutils. EPSS 3.3% estimated probability of exploitation activity in the next 30 days.

On this page
A flaw was found in binutils readelf 2.35 program. An attacker who is able to convince a victim using readelf to read a crafted file could trigger a stack buffer overflow, out-of-bounds write of arbitrary data supplied by the attacker. The highest impact of this flaw is to confidentiality, integrity, and availability.

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS
3.3% (unchanged from 3.3% a week ago; 3.3% 30 days ago) estimated probability of exploitation activity in the next 30 days; 89th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-787 Out-of-bounds Write
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-20294 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-20294?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-20294?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-20294 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
gnu:binutilsfrom 2.35 before 2.35.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14binutils2.35.2-1DEBIAN-CVE-2021-20294
SUSEEnterprise Storage 6, Linux Enterprise High Performance Computing 15 SP1-ESPOS, Linux Enterprise High Performance Computing 15 SP1-LTSS and 9 morebinutils2.37-7.26.1SUSE-SU-2021:3643-1
SUSEHPE Helion OpenStack 8, Linux Enterprise Server 12 SP2-BCL, Linux Enterprise Server 12 SP3-BCL and 10 morebinutils2.37-9.44.1SUSE-SU-2021:3637-1
SUSELinux Enterprise High Performance Computing 15-ESPOS, Linux Enterprise High Performance Computing 15-LTSS, Linux Enterprise Server 15-LTSS and 1 morebinutils2.37-6.23.1SUSE-SU-2022:0934-1
SUSELinux Enterprise Software Development Kit 12 SP5binutils, cross-ppc-binutils, cross-spu-binutils2.37-9.44.1SUSE-SU-2021:3637-1
openSUSELeap 15.2binutils, cross-rx-binutils, cross-arm-binutils and 19 more2.37-lp152.4.9.1openSUSE-SU-2021:1475-1
openSUSELeap 15.2bpftrace0.11.4-lp152.2.7.1openSUSE-SU-2021:1475-1
openSUSELeap 15.3binutils, cross-rx-binutils, cross-arm-binutils and 19 more2.37-7.26.1openSUSE-SU-2021:3643-1
openSUSETumbleweedbinutils2.37-3.1openSUSE-SU-2024:11634-1

From the distributions' data via OSV.dev: the Debian Security Tracker; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · SUSE · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

The issue is classified as moderate severity primarily because binutils is not typically exposed to untrusted inputs in most environments, limiting its exploitation potential. The buffer overflow only triggers during the parsing of malformed ELF files, which would require an attacker to convince a user to process a malicious ELF file with readelf. Moreover, binutils does not handle privileged operations, meaning exploitation is unlikely to lead to system compromise or escalation of privileges. Additionally, the impact is localized to the application itself, without affecting the broader system or network security.

As per upstream binutils security policy this issue is not considered as a security flaw. Basically the key element of the policy that affects this is the understanding that analysis of untrusted binaries must always be done in a sandbox because the ELF format is open ended enough to make the analysis tools do anything, like including and processing arbitrary files. This eliminates the only possible vulnerability vector here, which is the possibility of a user being tricked into downloading and analyzing an untrusted ELF without sandboxing.

See the binutils security policy for more details:

https://sourceware.org/cgit/binutils-gdb/tree/binutils/SECURITY.txt

Red Hat's mitigation

Stack canaries, non-executable stack (NX), address space layout randomization (ASLR) are binary hardening protections enabled in Red Hat Enterprise Linux 7 and 8 that should greatly limit the impact of this flaw. An additional mitigation is to not use readelf to read files from untrusted sources.

To learn more about binary hardening protections in Red Hat Enterprise Linux, please see https://access.redhat.com/articles/65299

ProductPackageStateAdvisory
Red Hat Enterprise Linux 6binutilsOut of support scope
Red Hat Enterprise Linux 7binutilsOut of support scope
Red Hat Enterprise Linux 8binutilsNot affected
Red Hat Enterprise Linux 8gcc-toolset-10-binutilsWill not fix
Red Hat Enterprise Linux 8gcc-toolset-9-binutilsWill not fix
Red Hat Enterprise Linux 9binutilsNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-20294.

References

Check your stackJSON