# CVE-2022-41715: Memory exhaustion when compiling regular expressions in regexp/syntax

- Severity: High 7.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.73%, higher than 78% of CVEs (2026-12-01)
- Published: 2022-10-06T16:42:07.000Z
- Modified: 2026-09-08T08:47:48.430Z
- Also known as: GO-2022-1039, BIT-GOLANG-2022-41715
- Related: CGA-8g3g-5w5f-p9rf
- 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.

(As written by CVE List.)

## Affected

- regexp/syntax: before 1.18.7; from 1.19.0-0 before 1.19.2
- stdlib (Go): before 1.18.7; from 1.19.0-0 before 1.19.2
- golang go: before 1.18.7; from 1.19.0 before 1.19.2
- golang (Bitnami): before 1.18.7; from 1.19.0 before 1.19.2

## Every score

- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Bitnami Vulnerability Database: rating High

## References

- <https://go.dev/issue/55949> (advisory, issue-tracking, report, third-party-advisory)
- <https://go.dev/cl/439356> (fix, patch)
- <https://groups.google.com/g/golang-announce/c/xtuG5faxtaU> (discussion, mailing-list, release-notes, web)
- <https://pkg.go.dev/vuln/GO-2022-1039> (advisory, vendor-advisory)
- <https://security.gentoo.org/glsa/202311-09> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-41715> (web)

## Sources

- CVE List: [CVE-2022-41715](https://www.cve.org/CVERecord?id=CVE-2022-41715), CVE Terms of Use, modified 2025-02-13
- Go Vulnerability Database: [GO-2022-1039](https://pkg.go.dev/vuln/GO-2022-1039), CC-BY-4.0, modified 2026-07-15
- NVD: [CVE-2022-41715](https://nvd.nist.gov/vuln/detail/CVE-2022-41715), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-GOLANG-2022-41715](https://osv.dev/vulnerability/BIT-GOLANG-2022-41715), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2022-41715 · Whole record: https://cve.day/CVE-2022-41715.json · Rebuilt by cve.day 2026-11-25T22:58:15.699Z
