cve.bz

CVE-2021-38561 golang text: Out-of-bounds Read

7.5 highEPSS 1.5%Fix available

High (7.5) in golang text. EPSS 1.5% estimated probability of exploitation activity in the next 30 days. Fixed in golang.org/x/text 0.3.7.

On this page
golang.org/x/text/language in golang.org/x/text before 0.3.7 can panic with an out-of-bounds read during BCP 47 language tag parsing. Index calculation is mishandled. If parsing untrusted user input, this can be used as a vector for a denial-of-service attack.

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
1.5% (unchanged from 1.5% a week ago; 1.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 75th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: yes · Technical impact: partial, assessed 2025-04-14. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
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-38561 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-38561?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-38561?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-38561 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
golang:textbefore 0.3.7

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-ppp9-7jff-5vj2Gogolang.org/x/text<0.3.70.3.7
GO-2021-0113Gogolang.org/x/text<0.3.70.3.7

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14golang-golang-x-text0.3.7-1DEBIAN-CVE-2021-38561
Ubuntu16.04:LTS, 20.04:LTSgolang-x-textno fix listedUBUNTU-CVE-2021-38561
Ubuntu18.04:LTSgolang-x-text0.0~git20170627.0.6353ef0-1ubuntu2.1UBUNTU-CVE-2021-38561 USN-5873-1
Ubuntu20.04:LTSgolang-golang-x-text0.3.2-4ubuntu0.1UBUNTU-CVE-2021-38561 USN-5873-1
Ubuntu22.04:LTSgolang-golang-x-text0.3.7-1UBUNTU-CVE-2021-38561 USN-5873-1
Red Hatcontainer_native_virtualization:4.12::el7kubevirt, kubevirt-virtctl, kubevirt-virtctl-redistributable0:4.12.0-1057.el7RHSA-2023:0407
Red Hatcontainer_native_virtualization:4.12::el8kubevirt, kubevirt-virtctl, kubevirt-virtctl-redistributable0:4.12.0-1057.el8RHSA-2023:0407
Red Hatopenshift:4.11::el8cri-o, cri-o-debuginfo, cri-o-debugsource0:1.24.5-2.rhaos4.11.gitb007cb6.el8RHBA-2023:1649
Red Hatopenshift:4.11::el8haproxy, haproxy22, haproxy-debugsource and 1 more0:2.2.24-3.rhaos4.11.el8RHBA-2023:1649
Red Hatopenshift:4.11::el8kernel-rt, kernel-rt-kvm, kernel-rt-core and 15 more0:4.18.0-372.51.1.rt7.208.el8_6RHBA-2023:1649
Red Hatopenshift:4.11::el8openshift, openshift-hyperkube0:4.11.0-202304042055.p0.g8f6c8a6.assembly.stream.el8RHBA-2023:1649
openSUSETumbleweedcni1.1.2-2.1openSUSE-SU-2024:12599-1
openSUSETumbleweedgitleaks8.18.3-1.1openSUSE-SU-2024:14015-1
Alpinev3.16, v3.17, v3.18 and 6 moregit-lfs3.1.2-r3ALPINE-CVE-2021-38561
Azure Linux3buildah1.41.4-2AZL-44952
Azure Linux3cni1.1.2-2AZL-41469
Azure Linux3containernetworking-plugins1.6.1-4AZL-45375
Azure Linux3multus4.0.2-1AZL-41221
Azure Linux3podman5.6.1-2AZL-44622

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 · openSUSE · Alpine.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This flaw may be triggered only by accepting untrusted user input to the vulnerable golang's library. The overall DoS attack vector depends directly on how the library's input is exposed by the consuming application, thus Red Hat rates impact as Moderate.

In Red Hat Advanced Cluster Management for Kubernetes (RHACM) 2.5 version, the registration-operator, lighthouse-coredns, lighthouse-agent, gatekeeper-operator, and discovery-operator components are affected by this flaw, but the rest of the components are using an already patched version and are unaffected. For 2.4 and previous versions of Red Hat Advanced Cluster Management for Kubernetes (RHACM), most of the components are affected.

ProductPackageStateAdvisory
Logging subsystem for Red Hat OpenShift 5.4openshift-logging/elasticsearch-rhel8-operator:v5.4.3-12Fixed 2022-07-18RHSA-2022:5556
OpenShift Developer Tools and Services for OCP 4.7ocp-tools-4/service-binding-operator-bundle:v1.1.1-4Fixed 2022-07-07RHSA-2022:5525
OpenShift Developer Tools and Services for OCP 4.7ocp-tools-4/service-binding-rhel8-operator:v1.1.1-3Fixed 2022-07-07RHSA-2022:5525
OpenShift Logging 5.2openshift-logging/elasticsearch-rhel8-operator:v5.2.13-1Fixed 2022-08-04RHSA-2022:5909
OpenShift Logging 5.3openshift-logging/elasticsearch-rhel8-operator:v5.3.10-1Fixed 2022-08-04RHSA-2022:5908
Red Hat OpenShift Container Platform 4.11cri-o-0:1.24.5-2.rhaos4.11.gitb007cb6.el8Fixed 2023-04-12RHBA-2023:1649
Red Hat OpenShift Container Platform 4.11haproxy-0:2.2.24-3.rhaos4.11.el8Fixed 2023-04-12RHBA-2023:1649
Red Hat OpenShift Container Platform 4.11kernel-rt-0:4.18.0-372.51.1.rt7.208.el8_6Fixed 2023-04-12RHBA-2023:1649
Red Hat OpenShift Container Platform 4.11openshift-0:4.11.0-202304042055.p0.g8f6c8a6.assembly.stream.el8Fixed 2023-04-12RHBA-2023:1649
Red Hat OpenShift Container Platform 4.11openshift4/cloud-event-proxy-rhel8:v4.11.0-202208020706.p0.g642796d.assembly.streamFixed 2022-08-10RHSA-2022:5070
Logging Subsystem for Red Hat OpenShiftopenshift-logging/elasticsearch-proxy-rhel8Not affected
Migration Toolkit for Containersrhmtc/openshift-migration-controller-rhel8Not affected
Migration Toolkit for Containersrhmtc/openshift-migration-velero-restic-restore-helper-rhel8Not affected
Migration Toolkit for Containersrhmtc/openshift-migration-velero-rhel8Not affected
Migration Toolkit for Virtualizationmigration-toolkit-virtualization/mtv-must-gather-api-rhel8Not affected
OpenShift API for Data Protectionoadp/oadp-velero-restic-restore-helper-rhel8Not affected
OpenShift API for Data Protectionoadp/oadp-velero-rhel9Not affected
OpenShift Developer Tools and ServicesodoFix deferred
OpenShift Service Mesh 2.0servicemeshAffected
OpenShift Service Mesh 2.0servicemesh-cniAffected
385 more in the JSON and on Red Hat's page.

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

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