CVE-2022-41715
Memory exhaustion when compiling regular expressions in regexp/syntax
- Published
- Updated
- Reserved
- Assigned by
- Go
Description
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.
Timeline
ID reserved
By Go
- 16 days later
· 16 days later
Published
- 2 years later
· 2 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| NVDNVD · Modified | 3.1 | High7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
- EPSS (exploitation in 30 days)
- 1.7% · top 22% of all CVEs (7 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 7.5.
Weakness
- CWE 400: Uncontrolled Resource Consumption
Affected products
Go standard library · regexp/syntax
- affected < 1.18.7
- affected 1.19.0-0 – < 1.19.2
References (5)
- https://go.dev/issue/55949 (opens in a new tab)x_transferred
- https://go.dev/cl/439356 (opens in a new tab)x_transferred
- https://groups.google.com/g/golang-announce/c/xtuG5faxtaU (opens in a new tab)x_transferred
- https://pkg.go.dev/vuln/GO-2022-1039 (opens in a new tab)x_transferred
- https://security.gentoo.org/glsa/202311-09 (opens in a new tab)x_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisories (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://trackcve.app/cve/CVE-2022-41715)Record last updated .