Skip to content
Heist/ feed
Back to feed
MediumFix available

samba — security advisory

Type: advisorySources: OSVAdvisory ID: ALPINE-CVE-2021-20254

A flaw was found in samba. The Samba smbd file server must map Windows group identities (SIDs) into unix group ids (gids). The code that performs this had a flaw that could allow it to read data beyond the end of the array in the case where a negative cache entry had been added to the mapping cache. This could cause the calling code to return those values into the process token that stores the group membership for a user. The highest threat from this vulnerability is to data confidentiality and integrity.

Products
samba
Affected versions
Not specified
Fixed versions
4.12.15-r0, 4.13.8-r0, 4.14.4-r0
CVEs
CVE-2021-20254
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 22:02 UTC · Revision 1

Source evidence

ALPINE-CVE-2021-20254

core-osv · Original source

Published 5 May 2021, 14:15 UTC

A flaw was found in samba. The Samba smbd file server must map Windows group identities (SIDs) into unix group ids (gids). The code that performs this had a flaw that could allow it to read data beyond the end of the array in the case where a negative cache entry had been added to the mapping cache. This could cause the calling code to return those values into the process token that stores the group membership for a user. The highest threat from this vulnerability is to data confidentiality and integrity.

osv:ALPINE-CVE-2021-20254

samba

Fixed versions: 4.12.15-r0

samba

Fixed versions: 4.13.8-r0

samba

Fixed versions: 4.14.4-r0

samba

Fixed versions: 4.14.4-r0

samba

Fixed versions: 4.14.4-r0

samba

Fixed versions: 4.14.4-r0

samba

Fixed versions: 4.14.4-r0

samba

Fixed versions: 4.14.4-r0

samba

Fixed versions: 4.14.4-r0

samba

Fixed versions: 4.14.4-r0

samba

Fixed versions: 4.14.4-r0

samba

Fixed versions: 4.14.4-r0

samba

Fixed versions: 4.14.4-r0

Complete source record
{
  "id": "a16010e90471bdaaba90fc55afb8f47229bdff2e38d67e08b49259b81febfb74",
  "url": "https://osv.dev/vulnerability/ALPINE-CVE-2021-20254",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "ALPINE-CVE-2021-20254",
    "summary": "A flaw was found in samba. The Samba smbd file server must map Windows group identities (SIDs) into unix group ids (gids). The code that performs this had a flaw that could allow it to read data beyond the end of the array in the case where a negative cache entry had been added to the mapping cache. This could cause the calling code to return those values into the process token that stores the group membership for a user. The highest threat from this vulnerability is to data confidentiality and integrity.",
    "evidence": "osv:ALPINE-CVE-2021-20254",
    "products": [
      {
        "name": {
          "value": "samba",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.12.15-r0",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "samba",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.13.8-r0",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "samba",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.14.4-r0",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "samba",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.14.4-r0",
            "evidence": "/affected/3/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "samba",
          "evidence": "/affected/4/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.14.4-r0",
            "evidence": "/affected/4/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "samba",
          "evidence": "/affected/5/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.14.4-r0",
            "evidence": "/affected/5/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "samba",
          "evidence": "/affected/6/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.14.4-r0",
            "evidence": "/affected/6/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "samba",
          "evidence": "/affected/7/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.14.4-r0",
            "evidence": "/affected/7/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "samba",
          "evidence": "/affected/8/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.14.4-r0",
            "evidence": "/affected/8/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "samba",
          "evidence": "/affected/9/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.14.4-r0",
            "evidence": "/affected/9/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "samba",
          "evidence": "/affected/10/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.14.4-r0",
            "evidence": "/affected/10/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "samba",
          "evidence": "/affected/11/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.14.4-r0",
            "evidence": "/affected/11/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "samba",
          "evidence": "/affected/12/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.14.4-r0",
            "evidence": "/affected/12/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "ALPINE-CVE-2021-20254",
      "aliases": [
        "ALPINE-CVE-2021-20254"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "3.6.0"
                },
                {
                  "fixed": "4.12.15-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "samba",
            "purl": "pkg:apk/alpine/samba?arch=source",
            "ecosystem": "Alpine:v3.12"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-20254.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "3.6.0"
                },
                {
                  "fixed": "4.13.8-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "samba",
            "purl": "pkg:apk/alpine/samba?arch=source",
            "ecosystem": "Alpine:v3.13"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-20254.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "3.6.0"
                },
                {
                  "fixed": "4.14.4-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "samba",
            "purl": "pkg:apk/alpine/samba?arch=source",
            "ecosystem": "Alpine:v3.14"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-20254.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "3.6.0"
                },
                {
                  "fixed": "4.14.4-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "samba",
            "purl": "pkg:apk/alpine/samba?arch=source",
            "ecosystem": "Alpine:v3.15"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-20254.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "3.6.0"
                },
                {
                  "fixed": "4.14.4-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "samba",
            "purl": "pkg:apk/alpine/samba?arch=source",
            "ecosystem": "Alpine:v3.16"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-20254.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "3.6.0"
                },
                {
                  "fixed": "4.14.4-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "samba",
            "purl": "pkg:apk/alpine/samba?arch=source",
            "ecosystem": "Alpine:v3.17"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-20254.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "3.6.0"
                },
                {
                  "fixed": "4.14.4-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "samba",
            "purl": "pkg:apk/alpine/samba?arch=source",
            "ecosystem": "Alpine:v3.18"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-20254.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "3.6.0"
                },
                {
                  "fixed": "4.14.4-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "samba",
            "purl": "pkg:apk/alpine/samba?arch=source",
            "ecosystem": "Alpine:v3.19"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-20254.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "3.6.0"
                },
                {
                  "fixed": "4.14.4-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "samba",
            "purl": "pkg:apk/alpine/samba?arch=source",
            "ecosystem": "Alpine:v3.20"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-20254.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "3.6.0"
                },
                {
                  "fixed": "4.14.4-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "samba",
            "purl": "pkg:apk/alpine/samba?arch=source",
            "ecosystem": "Alpine:v3.21"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-20254.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "3.6.0"
                },
                {
                  "fixed": "4.14.4-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "samba",
            "purl": "pkg:apk/alpine/samba?arch=source",
            "ecosystem": "Alpine:v3.22"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-20254.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "3.6.0"
                },
                {
                  "fixed": "4.14.4-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "samba",
            "purl": "pkg:apk/alpine/samba?arch=source",
            "ecosystem": "Alpine:v3.23"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-20254.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "3.6.0"
                },
                {
                  "fixed": "4.14.4-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "samba",
            "purl": "pkg:apk/alpine/samba?arch=source",
            "ecosystem": "Alpine:v3.24"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-20254.json"
          },
          "ecosystem_specific": {}
        }
      ],
      "modified": "2026-10-23T17:17:56.143047938Z",
      "provider": "osv",
      "upstream": [
        "CVE-2021-20254"
      ],
      "references": [
        "https://security.alpinelinux.org/vuln/CVE-2021-20254"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2021-20254",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 415284,
  "published_at": "2021-05-05T14:15:07.883+00:00"
}