CVE-2022-24921
JSON

7.5high

Stack exhaustion when compiling deeply nested expressions in regexp

Severity
7.5high CVSS:3.1 by NVD
Exploit likelihood
3.26% (higher than 88% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
GO-2021-0347BIT-GOLANG-2022-24921

Description

regexp.Compile in Go before 1.16.15 and 1.17.x before 1.17.8 allows stack exhaustion via a deeply nested expression.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
stdlib (Go)before 1.16.15, from 1.17.0-0 before 1.17.8Go Vulnerability Database
golang gobefore 1.16.15, from 1.17 before 1.17.8NVD
netapp astra_tridentNot specifiedNVD
debian debian_linux9.0NVD
golang (Bitnami)before 1.16.15, from 1.17.0 before 1.17.8Bitnami Vulnerability Database

All scores

NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD5.0medium CVSS:2.0AV:N/AC:L/Au:N/C:N/I:N/A:P
Bitnami Vulnerability Databasehigh rating

Classification

What each source says

CVE List

regexp.Compile in Go before 1.16.15 and 1.17.x before 1.17.8 allows stack exhaustion via a deeply nested expression.

Go Vulnerability Database

On 64-bit platforms, an extremely deeply nested expression can cause regexp.Compile to cause goroutine stack exhaustion, forcing the program to exit. Note this applies to very large expressions, on the order of 2MB.

NVD (es)

El archivo regexp.Compile en Go versiones anteriores a 1.16.15 y versiones 1.17.x anteriores a 1.17.8, permite un agotamiento de la pila por medio de una expresión profundamente anidada

References

https://groups.google.com/g/golang-announce/c/RP1hfrBYVukadvisory, issue-tracking, mailing-list, release-notes, third-party-advisory, web
https://security.netapp.com/advisory/ntap-20220325-0010/advisory, third-party-advisory
https://lists.debian.org/debian-lts-announce/2022/04/msg00017.htmladvisory, mailing-list, third-party-advisory
https://lists.debian.org/debian-lts-announce/2022/04/msg00018.htmladvisory, mailing-list, third-party-advisory
https://security.gentoo.org/glsa/202208-02advisory, third-party-advisory, vendor-advisory
https://cert-portal.siemens.com/productcert/pdf/ssa-744259.pdf
https://lists.debian.org/debian-lts-announce/2023/04/msg00021.htmlmailing-list, web
https://go.dev/cl/384616fix
https://go.googlesource.com/go/+/452f24ae94f38afa3704d4361d91d51218405c0afix
https://go.dev/issue/51112report
https://nvd.nist.gov/vuln/detail/CVE-2022-24921web

Sources

SourceRecordLicence
CVE ListCVE-2022-24921 changed 2024-08-03CVE Terms of Use
Go Vulnerability DatabaseGO-2021-0347 changed 2024-05-20CC-BY-4.0
NVDCVE-2022-24921 changed 2026-06-17Public domain
Bitnami Vulnerability DatabaseBIT-GOLANG-2022-24921 changed 2026-10-16Apache-2.0