{"id":"UBUNTU-CVE-2021-38561","details":"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.","modified":"2026-01-30T00:50:18.730561Z","published":"2022-12-26T06:15:00Z","related":["USN-5873-1"],"upstream":["CVE-2021-38561"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2021-38561"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-5873-1"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2021-38561"}],"affected":[{"package":{"name":"golang-x-text","ecosystem":"Ubuntu:16.04:LTS","purl":"pkg:deb/ubuntu/golang-x-text@0+git20151217.cf49866-0ubuntu1?arch=source&distro=xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0+git20151019.0fe7e68-0ubuntu1","0+git20151217.cf49866-0ubuntu1"],"ecosystem_specific":{"binaries":[{"binary_name":"golang-x-text-dev","binary_version":"0+git20151217.cf49866-0ubuntu1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-38561.json"}},{"package":{"name":"golang-x-text","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/golang-x-text@0.0~git20170627.0.6353ef0-1ubuntu2.1?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.0~git20170627.0.6353ef0-1ubuntu2.1"}]}],"versions":["0.0~git20170627.0.6353ef0-1ubuntu1","0.0~git20170627.0.6353ef0-1ubuntu2"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"golang-golang-x-text-dev","binary_version":"0.0~git20170627.0.6353ef0-1ubuntu2.1"},{"binary_name":"golang-x-text-dev","binary_version":"0.0~git20170627.0.6353ef0-1ubuntu2.1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-38561.json"}},{"package":{"name":"golang-golang-x-text","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/golang-golang-x-text@0.3.2-4ubuntu0.1?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.3.2-4ubuntu0.1"}]}],"versions":["0.3.2-3","0.3.2-4"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"golang-golang-x-text-dev","binary_version":"0.3.2-4ubuntu0.1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-38561.json"}},{"package":{"name":"golang-x-text","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/golang-x-text@0.3.2-1?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.3.2-1"],"ecosystem_specific":{"binaries":[{"binary_name":"golang-golang-x-text-dev","binary_version":"0.3.2-1"},{"binary_name":"golang-x-text-dev","binary_version":"0.3.2-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-38561.json"}},{"package":{"name":"golang-golang-x-text","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/golang-golang-x-text@0.3.7-1?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.3.7-1"}]}],"versions":["0.3.6-1"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"golang-golang-x-text-dev","binary_version":"0.3.7-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-38561.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"},{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"},{"type":"Ubuntu","score":"medium"}]}