CVE-2021-38561Golang Text
High 7.5 No auth needed
Follow: this CVE · Golang · Golang Text We alert you by email or Slack (account required).
- 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.
What to do
- Apply the vendor's security update for Text.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How 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)
| Vendor | Product | Versions |
|---|---|---|
| golang | text | < 0.3.7 |
Official advisories
- Red Hat Security Advisory: OpenShift Virtualization 4.12.0 RPMs security update · Red Hat · RHSA-2023:0407 · Sep 30, 2024 Medium
Vendor, CERT and distribution advisories that name this CVE. Original titles.
Official sources
References
Links published by the sources. Open them with care.
- deps.dev Patch Third Party Advisory
- go.googlesource.com Mailing List Patch Vendor Advisory
- groups.google.com Mailing List Third Party Advisory
- pkg.go.dev Product Vendor Advisory