CVE-2021-38561
HIGH 7.5CVSS 3.1golang.org/x/text/language Out-of-bounds Read vulnerability
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.
- Published
- 26 Dec 2022
- Last modified
- 10 Sep 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-125
- Also known as
- GHSA-ppp9-7jff-5vj2GO-2021-0113
- Sources
- NVDJSONOSV GHSA-ppp9-7jff-5vj2JSONOSV GO-2021-0113JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 134c704f-9b21-4f2e-91b3-4a467353bcc0 (Secondary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | golang | textcpe:2.3:a:golang:text:*:*:*:*:*:*:*:* |
< 0.3.7 | 0.3.7 |
| OSV | Go | golang.org/x/text | < 0.3.7 | 0.3.7 |
References
- https://deps.dev/advisory/OSV/GO-2021-0113 · Patch, Third Party Advisory, WEB
- https://go.googlesource.com/text/+/383b2e75a7a4198c42f8f87833eefb772868a56f · Mailing List, Patch, Vendor Advisory, WEB, FIX
- https://groups.google.com/g/golang-announce · Mailing List, Third Party Advisory, WEB
- https://pkg.go.dev/golang.org/x/text/language · Product, Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-38561 · ADVISORY
- https://go.dev/cl/340830 · WEB, FIX
- https://pkg.go.dev/vuln/GO-2021-0113 · WEB
History
- 25 Nov 2026 20:35 UTC · NVD: first stored (published 26 Dec 2022)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 6 Oct 2021)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 26 Dec 2022)