---
id: CVE-2022-32149
aliases:
  - GHSA-69ch-w2m2-3vjp
  - GO-2022-1059
title: >-
  golang.org/x/text/language Denial of service via crafted Accept-Language
  header
summary: >-
  golang.org/x/text/language Denial of service via crafted Accept-Language
  header
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'
vendor: x
product: golang.org/x/text
ecosystem: go
affected:
  - golang.org/x/text < 0.3.8
patched:
  - golang.org/x/text 0.3.8
published: '2022-10-14'
updated: '2026-09-10'
sourceUpdated: '2026-09-10T03:49:46.240531909Z'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-69ch-w2m2-3vjp'
references:
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2022-32149'
  - url: 'https://github.com/golang/go/issues/56152'
  - url: >-
      https://github.com/golang/text/commit/434eadcdbc3b0256971992e8c70027278364c72c
  - url: 'https://github.com/golang/text'
  - url: 'https://go.dev/cl/442235'
  - url: 'https://go.dev/issue/56152'
  - url: 'https://groups.google.com/g/golang-announce/c/-hjNw559_tE/m/KlGTfid5CAAJ'
  - url: 'https://pkg.go.dev/vuln/GO-2022-1059'
  - url: 'https://security.netapp.com/advisory/ntap-20230203-0006'
tags:
  - osv
  - go
epss: 0.01558
epssPercentile: 0.74102
ingestedAt: '2026-09-12T03:13:01.758Z'
---

## Overview

The BCP 47 tag parser has quadratic time complexity due to inherent aspects of its design. Since the parser is, by design, exposed to untrusted user input, this can be leveraged to force a program to consume significant time parsing Accept-Language headers. The parser cannot be easily rewritten to fix this behavior for various reasons. Instead the solution implemented in this CL is to limit the total complexity of tags passed into ParseAcceptLanguage by limiting the number of dashes in the string to 1000. This should be more than enough for the majority of real world use cases, where the number of tags being sent is likely to be in the single digits.

### Specific Go Packages Affected
golang.org/x/text/language

## Affected packages

- `golang.org/x/text < 0.3.8`

## Remediation

Upgrade to a patched release:

- `golang.org/x/text 0.3.8`
