GO-2021-0347

Stack exhaustion when compiling deeply nested expressions in regexp

At a glance

Published
Updated
CVE
CVE-2022-24921
Aliases
BIT-golang-2022-24921

Description

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.

Affected packages

PackageVersions
Go · stdlibintroduced 0, fixed 1.16.15, introduced 1.17.0-0, fixed 1.17.8

References

Sources

SourceLicence
OSV.devCC-BY 4.0 — Go Vulnerability Database