cve.bz

CVE-2021-20305 Out-of-bounds Write

8.1 highEPSS 1.7%Fix available

High (8.1). EPSS 1.7% estimated probability of exploitation activity in the next 30 days.

On this page
A flaw was found in Nettle in versions before 3.7.2, where several Nettle signature verification functions (GOST DSA, EDDSA & ECDSA) result in the Elliptic Curve Cryptography point (ECC) multiply function being called with out-of-range scalers, possibly resulting in incorrect results. This flaw allows an attacker to force an invalid signature, causing an assertion failure or possible validation. The highest threat to this vulnerability is to confidentiality, integrity, as well as system availability.

Severity

CVSS 3.1

8.1 high
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
1.7% (unchanged from 1.7% a week ago; 1.7% 30 days ago) estimated probability of exploitation activity in the next 30 days; 77th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CWEs
CWE-787 Out-of-bounds Write
CWE-327 Use of a Broken or Risky Cryptographic Algorithm
OWASP Top 10
A04:2025 Cryptographic Failures
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-20305 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-20305?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-20305?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-20305 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.

Badge for a README or a site

CVE-2021-20305

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2021-20305](https://cve.bz/cve/badge/CVE-2021-20305.svg)](https://cve.bz/cve/CVE-2021-20305)

HTML:

<a href="https://cve.bz/cve/CVE-2021-20305"><img src="https://cve.bz/cve/badge/CVE-2021-20305.svg" alt="CVE-2021-20305"></a>

Affected

Versions

From the NVD's CPE matches.

ProductAffected
nettle_project:nettlebefore 3.7.2
fedoraproject:fedora33
redhat:enterprise_linux7.0
redhat:enterprise_linux8.0
debian:debian_linux9.0
debian:debian_linux10.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian9nettle3.3-1+deb9u1DLA-2760-1
Debian10nettle3.4.1-1+deb10u1DSA-4933-1
Debian12, 13, 14nettle3.7.2-1DEBIAN-CVE-2021-20305
Ubuntu14.04:LTSnettleno fix listedUBUNTU-CVE-2021-20305
Ubuntu16.04:LTSnettle3.2-1ubuntu0.16.04.2UBUNTU-CVE-2021-20305 USN-4906-1
Ubuntu18.04:LTSnettle3.4-1ubuntu0.1UBUNTU-CVE-2021-20305 USN-4906-1
Ubuntu20.04:LTSnettle3.5.1+really3.5.1-2ubuntu0.1UBUNTU-CVE-2021-20305 USN-4906-1
Red Hatenterprise_linux:7::client, enterprise_linux:7::server, enterprise_linux:7::workstationnettle, nettle-devel, nettle-debuginfo0:2.7.1-9.el7_9RHSA-2021:1145
Red Hatenterprise_linux:7::computenodenettle-devel, nettle-debuginfo0:2.7.1-9.el7_9RHSA-2021:1145
Red Hatenterprise_linux:8::appstreamgnutls-c++, gnutls-dane, gnutls-devel and 6 more0:3.6.14-8.el8_3RHSA-2021:1206
Red Hatenterprise_linux:8::appstreamnettle-devel, nettle-debuginfo, nettle-debugsource0:3.4.1-4.el8_3RHSA-2021:1206
Red Hatenterprise_linux:8::baseosgnutls, gnutls-debuginfo, gnutls-debugsource and 3 more0:3.6.14-8.el8_3RHSA-2021:1206
Red Hatenterprise_linux:8::baseosnettle, nettle-debuginfo, nettle-debugsource0:3.4.1-4.el8_3RHSA-2021:1206
Red Hatrhel_aus:7.3::servernettle, nettle-devel, nettle-debuginfo0:2.7.1-9.el7_3RHSA-2021:2760
Red Hatrhel_aus:7.4::server, rhel_e4s:7.4::server, rhel_tus:7.4::servernettle, nettle-devel, nettle-debuginfo0:2.7.1-9.el7_4RHSA-2021:2758
Red Hatrhel_aus:7.6::server, rhel_e4s:7.6::server, rhel_tus:7.6::servernettle, nettle-devel, nettle-debuginfo0:2.7.1-9.el7_6RHSA-2021:2356
Red Hatrhel_eus:7.7::computenode, rhel_eus:7.7::servernettle, nettle-devel, nettle-debuginfo0:2.7.1-9.el7_7RHSA-2021:2280
Red Hatrhel_eus:8.1::appstreamgnutls-c++, gnutls-dane, gnutls-devel and 6 more0:3.6.8-10.el8_1RHSA-2021:1245
Red Hatrhel_eus:8.1::appstreamnettle-devel, nettle-debuginfo, nettle-debugsource0:3.4.1-2.el8_1RHSA-2021:1245
6 more for Red Hat in the JSON and on Red Hat's page.
SUSEEnterprise Storage 6, Linux Enterprise High Performance Computing 15 SP1-ESPOS, Linux Enterprise High Performance Computing 15 SP1-LTSS and 12 morelibnettle3.4.1-4.15.1SUSE-SU-2021:1412-1
SUSEHPE Helion OpenStack 8, Linux Enterprise Server 12 SP2-BCL, Linux Enterprise Server 12 SP3-BCL and 11 morelibnettle2.7.1-13.3.1SUSE-SU-2021:1399-1
openSUSELeap 15.2libnettle3.4.1-lp152.4.3.1openSUSE-SU-2021:0635-1
Rocky Linux8gnutls0:3.6.14-8.el8_3RLSA-2021:1206
Rocky Linux8nettle0:3.4.1-4.el8_4RLSA-2021:1206
Alpinev3.13, v3.14, v3.15 and 9 morenettle3.7.2-r0ALPINE-CVE-2021-20305

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Important.

Red Hat's statement

* Although Red Hat OpenStack's dibbler package bundles nettle, it does not include the flawed functionality and is therefore unaffected.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 7nettle-0:2.7.1-9.el7_9Fixed 2021-04-08RHSA-2021:1145
Red Hat Enterprise Linux 7.3 Advanced Update Supportnettle-0:2.7.1-9.el7_3Fixed 2021-07-19RHSA-2021:2760
Red Hat Enterprise Linux 7.4 Advanced Update Supportnettle-0:2.7.1-9.el7_4Fixed 2021-07-15RHSA-2021:2758
Red Hat Enterprise Linux 7.4 Telco Extended Update Supportnettle-0:2.7.1-9.el7_4Fixed 2021-07-15RHSA-2021:2758
Red Hat Enterprise Linux 7.4 Update Services for SAP Solutionsnettle-0:2.7.1-9.el7_4Fixed 2021-07-15RHSA-2021:2758
Red Hat Enterprise Linux 7.6 Advanced Update Supportnettle-0:2.7.1-9.el7_6Fixed 2021-06-09RHSA-2021:2356
Red Hat Enterprise Linux 7.6 Telco Extended Update Supportnettle-0:2.7.1-9.el7_6Fixed 2021-06-09RHSA-2021:2356
Red Hat Enterprise Linux 7.6 Update Services for SAP Solutionsnettle-0:2.7.1-9.el7_6Fixed 2021-06-09RHSA-2021:2356
Red Hat Enterprise Linux 7.7 Extended Update Supportnettle-0:2.7.1-9.el7_7Fixed 2021-06-07RHSA-2021:2280
Red Hat Enterprise Linux 8gnutls-0:3.6.14-8.el8_3Fixed 2021-04-14RHSA-2021:1206
Red Hat Enterprise Linux 8nettle-0:3.4.1-4.el8_3Fixed 2021-04-14RHSA-2021:1206
Red Hat Enterprise Linux 8.1 Extended Update Supportgnutls-0:3.6.8-10.el8_1Fixed 2021-04-19RHSA-2021:1245
Red Hat Enterprise Linux 8.1 Extended Update Supportnettle-0:3.4.1-2.el8_1Fixed 2021-04-19RHSA-2021:1245
Red Hat Enterprise Linux 8.2 Extended Update Supportgnutls-0:3.6.8-12.el8_2Fixed 2021-04-19RHSA-2021:1246
Red Hat Enterprise Linux 8.2 Extended Update Supportnettle-0:3.4.1-2.el8_2Fixed 2021-04-19RHSA-2021:1246
Red Hat Enterprise Linux 9nettleNot affected
Red Hat OpenStack Platform 10 (Newton)nettleNot affected
Red Hat OpenStack Platform 13 (Queens)nettleNot affected
Red Hat OpenStack Platform 16.1nettleNot 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-20305.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-23-348-10Siemens SIMATIC S7-15002023-12-12Critical Manufacturing, Transportation Systems, Energy, Healthcare and Public Health, Financial Services, Government Services and FacilitiesSIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0), SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0), SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) and 2 morenone listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

Attack patterns (CAPEC)

  • CAPEC-20 Encryption Brute Forcing Likelihood: Low · Severity: Low
  • CAPEC-97 Cryptanalysis Likelihood: Low · Severity: Very High
  • CAPEC-459 Creating a Rogue Certification Authority Certificate Likelihood: Medium · Severity: Very High
  • CAPEC-473 Signature Spoof
  • CAPEC-475 Signature Spoofing by Improper Validation Likelihood: Low · Severity: High
  • CAPEC-608 Cryptanalysis of Cellular Encryption Severity: High
  • CAPEC-614 Rooting SIM Cards Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON