Live threats

All CVEs / Golang

CVE-2021-38561Golang Text

High 7.5 No auth needed

Priority
60
CVSS 3.1
7.5
EPSS
1.5%
probability of exploitation in 30 days · percentile 74
Auth required
No
Published
Dec 26, 2022
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-125
SSVC (CISA)
Exploitation: none · Automatable: yes · Technical impact: partial
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Text.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
Go golang.org/x/text < 0.3.7 0.3.7 go get golang.org/x/text@v0.3.7
Go golang.org/x/text < 0.3.7 0.3.7 go get golang.org/x/text@v0.3.7

Per OSV / GitHub Advisories (GHSA-ppp9-7jff-5vj2, GO-2021-0113). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
golangtext< 0.3.7

Official advisories

Vendor, CERT and distribution advisories that name this CVE. Original titles.

Official sources

References

Links published by the sources. Open them with care.