Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. golang.org/x/text/language
  4. ›
  5. CVE-2021-38561

CVE-2021-38561: Out-of-bounds Read

December 26, 2022 (updated January 9, 2023)

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.

References

  • deps.dev/advisory/OSV/GO-2021-0113
  • github.com/advisories/GHSA-ppp9-7jff-5vj2
  • go.googlesource.com/text/+/383b2e75a7a4198c42f8f87833eefb772868a56f
  • groups.google.com/g/golang-announce
  • nvd.nist.gov/vuln/detail/CVE-2021-38561
  • pkg.go.dev/golang.org/x/text/language

Code Behaviors & Features

Detect and mitigate CVE-2021-38561 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.3.7

Fixed versions

  • 0.3.7

Solution

Upgrade to version 0.3.7 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-125: Out-of-bounds Read

Source file

go/golang.org/x/text/language/CVE-2021-38561.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:37 +0000.