CVE-2022-41715
Memory exhaustion when compiling regular expressions in regexp/syntax
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
0Exploited in Wild
-Decision
Descriptions
Programs which compile regular expressions from untrusted sources may be vulnerable to memory exhaustion or denial of service. The parsed regexp representation is linear in the size of the input, but in some cases the constant factor can be as high as 40,000, making relatively small regexps consume much larger amounts of memory. After fix, each regexp being parsed is limited to a 256 MB memory footprint. Regular expressions whose representation would use more space than that are rejected. Normal use of regular expressions is unaffected.
Los programas que compilan expresiones regulares desde fuentes no confiables pueden ser vulnerables al agotamiento de la memoria o a la denegación de servicio. La representación de la regexp analizada es lineal en el tamaño de la entrada, pero en algunos casos el factor constante puede llegar a ser de 40.000, lo que hace que regexps relativamente pequeñas consuman cantidades mucho mayores de memoria. Después de la corrección, cada regexp que es analizado está limitada a un espacio de memoria de 256 MB. Las expresiones regulares cuya representación use más espacio que eso son rechazadas. El uso normal de las expresiones regulares no está afectado
A flaw was found in the golang package, where programs that compile regular expressions from untrusted sources are vulnerable to memory exhaustion or a denial of service. The parsed regexp representation is linear in the input size. Still, in some cases, the constant factor can be as high as 40,000, making a relatively small regexp consume larger amounts of memory. After the fix, each regexp being parsed is limited to a 256 MB memory footprint. Regular expressions whose representation would use more space than that are rejected. Routine use of regular expressions is unaffected.
CVSS Scores
SSVC
- Decision:-
Timeline
- 2022-09-28 CVE Reserved
- 2022-10-14 CVE Published
- 2024-06-04 EPSS Updated
- 2024-08-03 CVE Updated
- ---------- Exploited in Wild
- ---------- KEV Due Date
- ---------- First Exploit
CWE
CAPEC
References (7)
URL | Tag | Source |
---|---|---|
https://go.dev/issue/55949 | Issue Tracking | |
https://groups.google.com/g/golang-announce/c/xtuG5faxtaU | Mailing List | |
https://security.gentoo.org/glsa/202311-09 |
URL | Date | SRC |
---|
URL | Date | SRC |
---|---|---|
https://go.dev/cl/439356 | 2023-11-25 |
URL | Date | SRC |
---|---|---|
https://pkg.go.dev/vuln/GO-2022-1039 | 2023-11-25 | |
https://access.redhat.com/security/cve/CVE-2022-41715 | 2024-05-22 | |
https://bugzilla.redhat.com/show_bug.cgi?id=2132872 | 2024-05-22 |
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Golang Search vendor "Golang" | Go Search vendor "Golang" for product "Go" | < 1.18.7 Search vendor "Golang" for product "Go" and version " < 1.18.7" | - |
Affected
| ||||||
Golang Search vendor "Golang" | Go Search vendor "Golang" for product "Go" | >= 1.19.0 < 1.19.2 Search vendor "Golang" for product "Go" and version " >= 1.19.0 < 1.19.2" | - |
Affected
|