High
Security advisory
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-38561
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 07:01 UTC · Revision 1
Source evidence
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.
osv:CVE-2021-38561
Complete source record
{
"id": "59e2e76f10363bd0e2816164bb5d7a57cb3d1b23c63b85cc6474e215682937f8",
"url": "https://osv.dev/vulnerability/CVE-2021-38561",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2021-38561",
"summary": "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.",
"evidence": "osv:CVE-2021-38561",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2021-38561",
"aliases": [
"CVE-2021-38561",
"GHSA-ppp9-7jff-5vj2",
"GO-2021-0113"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/golang/text",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "383b2e75a7a4198c42f8f87833eefb772868a56f"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:golang:text:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "0.3.7"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"v0.3.6",
"v0.3.5",
"v0.3.4",
"v0.3.3",
"v0.3.2",
"v0.3.1",
"v0.3.0",
"v0.2.0",
"v0.1.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-38561.json"
}
}
],
"modified": "2026-10-24T10:30:47.295390749Z",
"provider": "osv",
"references": [
"https://groups.google.com/g/golang-announce",
"https://pkg.go.dev/golang.org/x/text/language",
"https://deps.dev/advisory/OSV/GO-2021-0113",
"https://go.googlesource.com/text/+/383b2e75a7a4198c42f8f87833eefb772868a56f"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2021-38561",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 436517,
"published_at": "2022-12-26T06:15:10.56+00:00"
}