Skip to content
Fencer Vulns
high 7.5

CVE-2021-20277 json

A flaw was found in Samba's libldb.

published 2021-05-12 5 y ago modified 2026-06-17 4 mo ago also EUVD-2021-7711

cvss
7.5
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
4.4%
EPSS 4.4% chance of exploitation in 30 days, percentile 91%
public exploits
0
none known

Summary

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.

Patch / fix

  • samba samba 4.12.13, 4.13.6, 4.14.1
  • samba Debian 14, Debian 13, Debian 12 2:4.13.13+dfsg-1

debian advisories DEBIAN-CVE-2021-20277

  • ldb Ubuntu 16.04 LTS 2:1.1.24-1ubuntu3.2
  • ldb Ubuntu 18.04 LTS 2:1.2.3-1ubuntu0.2
  • ldb Ubuntu 20.04 LTS 2:2.0.10-0ubuntu0.20.04.3
  • ldb Ubuntu Pro 14.04 LTS 1:1.1.24-0ubuntu0.14.04.2+esm1

ubuntu advisories UBUNTU-CVE-2021-20277

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • libldb RHEL 8 2.1.3-3.el8_3
  • ldb-tools RHEL 8 2.1.3-3.el8_3
  • python3-ldb RHEL 8 2.1.3-3.el8_3
  • libldb RHEL 7 1.5.4-2.el7_9
  • pyldb RHEL 7 1.5.4-2.el7_9
  • ldb-tools RHEL 7 1.5.4-2.el7_9
  • libldb RHEL 7.6 TUS, RHEL 7.6 E4S, RHEL 7.6 AUS 1.3.4-2.el7_6
  • pyldb RHEL 7.6 TUS, RHEL 7.6 E4S, RHEL 7.6 AUS 1.3.4-2.el7_6

red hat advisories RHSA-2021:2786RHSA-2021:2331RHSA-2021:1214RHSA-2021:1213RHSA-2021:1197RHSA-2021:1072

  • samba SLE Module for Python 2 15 SP3, SLE Module for Basesystem 15 SP3, SLE High Availability Extension 15 SP3 4.15.4+git.324.8332acf1a63-150300.3.25.3
  • ldb SLE Module for Basesystem 15 SP3, SLE Micro 5.1 2.4.1-150300.3.10.1
  • tdb SLE Module for Basesystem 15 SP3, SLE Micro 5.1 1.4.4-150300.3.3.2
  • krb5 SLE Module for Server Applications 15 SP3, SLE Module for Basesystem 15 SP3, SLE Micro 5.1 1.19.2-150300.8.3.2
  • sssd SLE Module for Basesystem 15 SP3, SLE Micro 5.1 1.16.1-150300.23.17.3
  • talloc SLE Module for Basesystem 15 SP3, SLE Micro 5.1 2.3.3-150300.3.3.2
  • tevent SLE Module for Basesystem 15 SP3, SLE Micro 5.1 0.11.0-150300.3.3.2
  • apparmor SLE Module for Server Applications 15 SP3, SLE Module for Basesystem 15 SP3, SLE Micro 5.1 2.13.6-150300.3.11.2

suse advisories SUSE-SU-2022:0283-1SUSE-SU-2021:3187-1SUSE-SU-2021:1498-1SUSE-SU-2021:1444-1SUSE-SU-2021:1440-1SUSE-SU-2021:0945-1

  • ldb openSUSE Tumbleweed 2.3.0-1.3
  • samba openSUSE Tumbleweed 4.14.6+git.182.2205d5224e3-1.1
  • samba openSUSE Leap 15.3 4.15.4+git.324.8332acf1a63-150300.3.25.3
  • ldb openSUSE Leap 15.3 2.4.1-150300.3.10.1
  • tdb openSUSE Leap 15.3 1.4.4-150300.3.3.2
  • krb5 openSUSE Leap 15.3 1.19.2-150300.8.3.2
  • sssd openSUSE Leap 15.3 1.16.1-150300.23.17.3
  • talloc openSUSE Leap 15.3 2.3.3-150300.3.3.2

opensuse advisories openSUSE-SU-2024:10911-1openSUSE-SU-2024:11365-1openSUSE-SU-2022:0283-1openSUSE-SU-2021:3187-1openSUSE-SU-2021:0636-1openSUSE-SU-2021:0469-1

  • samba Alpine 3.12 4.12.14-r0
  • samba Alpine 3.13 4.13.7-r0
  • samba Alpine 3.24, Alpine 3.23, Alpine 3.22 +8 more 4.14.2-r0

alpine advisories ALPINE-CVE-2021-20277

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • samba Azure Linux 3.0 4.18.3-1
  • libldb Azure Linux 3.0 2.7.2-1

azure linux advisories AZL-37000AZL-44535

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

  • samba Arch Linux 4.14.2-1
  • ldb Arch Linux 1:2.3.0-1

arch linux advisories AVG-1732AVG-1734

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2021-20277 updated cvss 7.1

samba: Out of bounds read in AD DC LDAP server

  • Red Hat Enterprise Linux 6 pyldb, libldb, ldb-tools
    affected: no fix planned “Out of support scope”
  • Red Hat Storage 3 ctdb, samba, samba-dc, ctdb-tests, samba-libs, samba-pidl, +21 more
    affected: no fix available
  • Red Hat Enterprise Linux BaseOS (v. 8) libldb 2.1.3-3.el8_3, ldb-tools 2.1.3-3.el8_3, python3-ldb 2.1.3-3.el8_3
    fixed: vendor fix RHSA-2021:1197
  • Red Hat Enterprise Linux BaseOS EUS (v. 8.1) libldb 1.5.4-3.el8_1, ldb-tools 1.5.4-3.el8_1, python3-ldb 1.5.4-3.el8_1
    fixed: vendor fix RHSA-2021:1214
  • Red Hat Enterprise Linux BaseOS EUS (v. 8.2) libldb 2.0.7-4.el8_2, ldb-tools 2.0.7-4.el8_2, python3-ldb 2.0.7-4.el8_2
    fixed: vendor fix RHSA-2021:1213
  • Red Hat Enterprise Linux Client (v. 7) pyldb 1.5.4-2.el7_9, libldb 1.5.4-2.el7_9 Red Hat Enterprise Linux Client Optional (v. 7) ldb-tools 1.5.4-2.el7_9
    fixed: vendor fix RHSA-2021:1072
  • Red Hat Enterprise Linux ComputeNode EUS (v. 7.7) libldb 1.4.2-2.el7_7
    fixed: vendor fix RHSA-2021:2331
  • Red Hat Enterprise Linux ComputeNode Optional (v. 7) ldb-tools 1.5.4-2.el7_9
    fixed: vendor fix RHSA-2021:1072
show 10 more
  • Red Hat Enterprise Linux ComputeNode Optional EUS (v. 7.7) pyldb 1.4.2-2.el7_7, ldb-tools 1.4.2-2.el7_7
    fixed: vendor fix RHSA-2021:2331
  • Red Hat Enterprise Linux Server (v. 7) pyldb 1.5.4-2.el7_9, libldb 1.5.4-2.el7_9
    fixed: vendor fix RHSA-2021:1072
  • Red Hat Enterprise Linux Server AUS (v. 7.6) pyldb 1.3.4-2.el7_6, libldb 1.3.4-2.el7_6 Red Hat Enterprise Linux Server E4S (v. 7.6) pyldb 1.3.4-2.el7_6, libldb 1.3.4-2.el7_6
    fixed: vendor fix RHSA-2021:2786
  • Red Hat Enterprise Linux Server EUS (v. 7.7) pyldb 1.4.2-2.el7_7, libldb 1.4.2-2.el7_7
    fixed: vendor fix RHSA-2021:2331
  • Red Hat Enterprise Linux Server Optional (v. 7) ldb-tools 1.5.4-2.el7_9
    fixed: vendor fix RHSA-2021:1072
  • Red Hat Enterprise Linux Server Optional AUS (v. 7.6) ldb-tools 1.3.4-2.el7_6 Red Hat Enterprise Linux Server Optional E4S (v. 7.6) pyldb 1.3.4-2.el7_6, ldb-tools 1.3.4-2.el7_6
    fixed: vendor fix RHSA-2021:2786
  • Red Hat Enterprise Linux Server Optional EUS (v. 7.7) pyldb 1.4.2-2.el7_7, ldb-tools 1.4.2-2.el7_7
    fixed: vendor fix RHSA-2021:2331
  • Red Hat Enterprise Linux Server Optional TUS (v. 7.6) ldb-tools 1.3.4-2.el7_6 Red Hat Enterprise Linux Server TUS (v. 7.6) pyldb 1.3.4-2.el7_6, libldb 1.3.4-2.el7_6
    fixed: vendor fix RHSA-2021:2786
  • Red Hat Enterprise Linux Workstation (v. 7) pyldb 1.5.4-2.el7_9, libldb 1.5.4-2.el7_9 Red Hat Enterprise Linux Workstation Optional (v. 7) ldb-tools 1.5.4-2.el7_9
    fixed: vendor fix RHSA-2021:1072
  • Red Hat Enterprise Linux 9 libldb, ldb-tools, python3-ldb
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

4.36% chance of exploitation in the next 30 days, higher than 91% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
NVD 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD 2.0 5.0 AV:N/AC:L/Au:N/C:N/I:N/A:P

Affected products

  • n/a samba

Classification

Weakness

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.