cve.bz

CVE-2021-20277 Out-of-bounds Write

7.5 highEPSS 4.2%

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

On this page
A flaw was found in Samba's libldb. Multiple, consecutive leading spaces in an LDAP attribute can lead to an out-of-bounds memory write, leading to a crash of the LDAP server process handling the request. The highest threat from this vulnerability is to system availability.

Severity

CVSS 3.1

7.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS
4.2% (unchanged from 4.4% a week ago; 4.3% 30 days ago) estimated probability of exploitation activity in the next 30 days; 91st percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWEs
CWE-787 Out-of-bounds Write
CWE-125 Out-of-bounds Read
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-20277 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-20277?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-20277?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-20277 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
samba:sambafrom 4.0.0 before 4.12.13
samba:sambafrom 4.13.0 before 4.13.6
samba:sambafrom 4.14.0 before 4.14.1
debian:debian_linux9.0
debian:debian_linux10.0
fedoraproject:fedora32
fedoraproject:fedora33
fedoraproject:fedora34

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian9ldb2:1.1.27-1+deb9u2DLA-2611-1
Debian10ldb2:1.5.1+really1.4.6-3+deb10u1DSA-4884-1
Debian12, 13, 14samba2:4.13.13+dfsg-1DEBIAN-CVE-2021-20277
Ubuntu16.04:LTSldb2:1.1.24-1ubuntu3.2UBUNTU-CVE-2021-20277 USN-4888-1
Ubuntu18.04:LTSldb2:1.2.3-1ubuntu0.2UBUNTU-CVE-2021-20277 USN-4888-1
Ubuntu20.04:LTSldb2:2.0.10-0ubuntu0.20.04.3UBUNTU-CVE-2021-20277 USN-4888-1
UbuntuPro:14.04:LTSldb1:1.1.24-0ubuntu0.14.04.2+esm1UBUNTU-CVE-2021-20277 USN-4888-2
Red Hatenterprise_linux:7::client, enterprise_linux:7::server, enterprise_linux:7::workstationpyldb, libldb, ldb-tools and 3 more0:1.5.4-2.el7_9RHSA-2021:1072
Red Hatenterprise_linux:7::computenodeldb-tools, pyldb-devel, libldb-devel and 1 more0:1.5.4-2.el7_9RHSA-2021:1072
Red Hatenterprise_linux:8::baseoslibldb, ldb-tools, python3-ldb and 5 more0:2.1.3-3.el8_3RHSA-2021:1197
Red Hatrhel_aus:7.6::server, rhel_e4s:7.6::server, rhel_tus:7.6::serverpyldb, libldb, ldb-tools and 3 more0:1.3.4-2.el7_6RHSA-2021:2786
Red Hatrhel_eus:7.7::computenode, rhel_eus:7.7::serverpyldb, libldb, ldb-tools and 3 more0:1.4.2-2.el7_7RHSA-2021:2331
Red Hatrhel_eus:8.1::baseoslibldb, ldb-tools, python3-ldb and 5 more0:1.5.4-3.el8_1RHSA-2021:1214
Red Hatrhel_eus:8.2::baseoslibldb, ldb-tools, python3-ldb and 5 more0:2.0.7-4.el8_2RHSA-2021:1213
SUSEEnterprise Storage 6, Linux Enterprise High Availability Extension 15 SP1, Linux Enterprise High Performance Computing 15 SP1-ESPOS and 7 moresamba4.9.5+git.432.d9b18c4f390-3.50.1SUSE-SU-2021:1498-1
SUSEEnterprise Storage 6, Linux Enterprise High Performance Computing 15 SP1-ESPOS, Linux Enterprise High Performance Computing 15 SP1-LTSS and 7 moreldb1.4.6-3.8.1SUSE-SU-2021:0944-1
SUSEEnterprise Storage 7ldb2.2.1-4.3.1SUSE-SU-2021:1440-1
SUSEEnterprise Storage 7samba4.13.6+git.211.555d60b24ba-3.9.1SUSE-SU-2021:1440-1
SUSELinux Enterprise High Availability Extension 15 SP2, Linux Enterprise Module for Basesystem 15 SP2, Linux Enterprise Module for Python 2 15 SP2samba4.11.14+git.247.8c858f7ee14-4.19.1SUSE-SU-2021:1444-1
SUSELinux Enterprise High Availability Extension 15 SP3, Linux Enterprise Module for Basesystem 15 SP3, Linux Enterprise Module for Python 2 15 SP3samba4.13.6+git.211.555d60b24ba-3.7.1SUSE-SU-2021:3187-1
SUSELinux Enterprise High Availability Extension 15 SP3, Linux Enterprise Module for Basesystem 15 SP3, Linux Enterprise Module for Python 2 15 SP3samba4.15.4+git.324.8332acf1a63-150300.3.25.3SUSE-SU-2022:0283-1
SUSELinux Enterprise Micro 5.1, Linux Enterprise Module for Basesystem 15 SP3ldb2.4.1-150300.3.10.1SUSE-SU-2022:0283-1
SUSELinux Enterprise Micro 5.1, Linux Enterprise Module for Basesystem 15 SP3libapparmor2.13.6-150300.3.11.1SUSE-SU-2022:0283-1
SUSELinux Enterprise Micro 5.1, Linux Enterprise Module for Basesystem 15 SP3sssd1.16.1-150300.23.17.3SUSE-SU-2022:0283-1
SUSELinux Enterprise Micro 5.1, Linux Enterprise Module for Basesystem 15 SP3talloc2.3.3-150300.3.3.2SUSE-SU-2022:0283-1
SUSELinux Enterprise Micro 5.1, Linux Enterprise Module for Basesystem 15 SP3tdb1.4.4-150300.3.3.2SUSE-SU-2022:0283-1
6 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.2ldb2.0.12-lp152.2.9.1openSUSE-SU-2021:0469-1
openSUSELeap 15.2samba4.11.14+git.247.8c858f7ee14-lp152.3.19.1openSUSE-SU-2021:0636-1
openSUSELeap 15.3apparmor2.13.6-150300.3.11.2openSUSE-SU-2022:0283-1
openSUSELeap 15.3krb5, krb5-mini1.19.2-150300.8.3.2openSUSE-SU-2022:0283-1
openSUSELeap 15.3ldb2.4.1-150300.3.10.1openSUSE-SU-2022:0283-1
openSUSELeap 15.3libapparmor2.13.6-150300.3.11.1openSUSE-SU-2022:0283-1
openSUSELeap 15.3samba4.13.6+git.211.555d60b24ba-3.7.1openSUSE-SU-2021:3187-1
openSUSELeap 15.3samba4.15.4+git.324.8332acf1a63-150300.3.25.3openSUSE-SU-2022:0283-1
openSUSELeap 15.3sssd1.16.1-150300.23.17.3openSUSE-SU-2022:0283-1
openSUSELeap 15.3talloc2.3.3-150300.3.3.2openSUSE-SU-2022:0283-1
openSUSELeap 15.3talloc-man2.3.3-150300.3.3.1openSUSE-SU-2022:0283-1
openSUSELeap 15.3tdb1.4.4-150300.3.3.2openSUSE-SU-2022:0283-1
4 more for openSUSE in the JSON and on openSUSE's page.
Alpinev3.12samba4.12.14-r0ALPINE-CVE-2021-20277
Alpinev3.13samba4.13.7-r0ALPINE-CVE-2021-20277
Alpinev3.14, v3.15, v3.16 and 8 moresamba4.14.2-r0ALPINE-CVE-2021-20277
Azure Linux2sambano fix listedAZL-7353
Azure Linux3libldb2.7.2-1AZL-44535
Azure Linux3samba4.18.3-1AZL-37000

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; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT. 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

The version of Samba shipped with Red Hat Gluster Storage (RHGS) 3 is built with a private copy of ldb (LDAP-like embedded database) library which includes the vulnerable code. However, Samba shipped with RHGS 3 is not supported for use as an Active Directory Domain Controller and hence the impact has been lowered.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 7libldb-0:1.5.4-2.el7_9Fixed 2021-04-06RHSA-2021:1072
Red Hat Enterprise Linux 7.6 Advanced Update Supportlibldb-0:1.3.4-2.el7_6Fixed 2021-07-20RHSA-2021:2786
Red Hat Enterprise Linux 7.6 Telco Extended Update Supportlibldb-0:1.3.4-2.el7_6Fixed 2021-07-20RHSA-2021:2786
Red Hat Enterprise Linux 7.6 Update Services for SAP Solutionslibldb-0:1.3.4-2.el7_6Fixed 2021-07-20RHSA-2021:2786
Red Hat Enterprise Linux 7.7 Extended Update Supportlibldb-0:1.4.2-2.el7_7Fixed 2021-06-08RHSA-2021:2331
Red Hat Enterprise Linux 8libldb-0:2.1.3-3.el8_3Fixed 2021-04-14RHSA-2021:1197
Red Hat Enterprise Linux 8.1 Extended Update Supportlibldb-0:1.5.4-3.el8_1Fixed 2021-04-15RHSA-2021:1214
Red Hat Enterprise Linux 8.2 Extended Update Supportlibldb-0:2.0.7-4.el8_2Fixed 2021-04-15RHSA-2021:1213
Red Hat Enterprise Linux 6libldbOut of support scope
Red Hat Enterprise Linux 9libldbNot affected
Red Hat Storage 3sambaAffected

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-20277.

Attack patterns (CAPEC)

  • CAPEC-540 Overread Buffers Likelihood: Low · Severity: High

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

References

Check your stackJSON