CVE-2021-38561
JSON

7.5high

golang.org/x/text/language Out-of-bounds Read vulnerability

Severity
7.5high CVSS:3.1 by CISA-ADP
Exploit likelihood
1.49% (higher than 74% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-ppp9-7jff-5vj2GO-2021-0113

Description

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.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
golang.org/x/text (Go)before 0.3.7GitHub Advisory Database, Go Vulnerability Database
golang textbefore 0.3.7NVD

All scores

CISA-ADP7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-125

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

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.

Go Vulnerability Database

Due to improper index calculation, an incorrectly formatted language tag can cause Parse to panic via an out of bounds read. If Parse is used to process untrusted user inputs, this may be used as a vector for a denial of service attack.

NVD (es)

golang.org/x/text/language en golang.org/x/text anterior a 0.3.7 puede entrar en pánico con una lectura fuera de los límites durante el análisis de etiquetas de idioma BCP 47. El cálculo del índice está mal manejado. Si se analizan entradas de usuarios que no son de confianza, esto se puede utilizar como vector para un ataque de Denegación de Servicio (DoS).

References

Related

Sources

SourceRecordLicence
CVE ListCVE-2021-38561 changed 2025-04-14CVE Terms of Use
GitHub Advisory DatabaseGHSA-ppp9-7jff-5vj2 changed 2026-09-10CC-BY-4.0
Go Vulnerability DatabaseGO-2021-0113 changed 2026-02-04CC-BY-4.0
NVDCVE-2021-38561 changed 2026-06-17Public domain