CVE-2022-41715
Memory exhaustion when compiling regular expressions in regexp/syntax
Reported by go · Published October 14, 2022
regexp/syntax is fixed in 1.19.2 and 1.18.7 (Go Modules)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| stdlib | Go Modules | 1.19.2, 1.18.7 |
| regexp/syntax | Go Modules | 1.19.2, 1.18.7 |
| kubeflow-katib | Wolfi | 0.19.0-r40, 0.19.0-r31 |
| golang-tests | Amazon Linux | 1.19.3-2.amzn2023.0.2, 1.18.8-1.amzn2.0.1 |
| golang-misc | Amazon Linux | 1.19.3-2.amzn2023.0.2, 1.18.8-1.amzn2.0.1 |
| golang-src | Amazon Linux | 1.19.3-2.amzn2023.0.2, 1.18.8-1.amzn2.0.1 |
| golang-race | Amazon Linux | 1.19.3-2.amzn2023.0.2, 1.18.8-1.amzn2.0.1 |
| golist | Amazon Linux | 0.10.1-11.amzn2023.0.3, 0.10.1-10.amzn2.0.2 |
| golang | Amazon Linux | 1.19.3-2.amzn2023.0.2, 1.18.8-1.amzn2.0.1 |
| golang-shared | Amazon Linux | 1.19.3-2.amzn2023.0.2, 1.18.8-1.amzn2.0.1 |
| golang-docs | Amazon Linux | 1.19.3-2.amzn2023.0.2, 1.18.8-1.amzn2.0.1 |
| kubeflow-katib | Chainguard | 0.19.0-r40, 0.19.0-r31 |
5 more packages have a fixed version. See every fix in Lookup.
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Go standard library | regexp/syntax | 0, 1.19.0-0 |
| wolfi | kubeflow-katib | 0, 0 |
| amazon:2023 | golang-tests | 0 |
| amazon:2 | golang-misc | 0 |
| amazon:2023 | golang-src | 0 |
| amazon:2 | golang-race | 0 |
| amazon:2023 | golist | 0 |
| amazon:2 | golang | 0 |
| amazon:2 | golang-tests | 0 |
| amazon:2 | golang-shared | 0 |
| amazon:2023 | golang-race | 0 |
| amazon:2 | golist | 0 |
| amazon:2 | golang-src | 0 |
| amazon:2023 | golang-docs | 0 |
| chainguard | kubeflow-katib | 0, 0 |
| amazon:2023 | golang | 0 |
| amazon:2023 | golang-bin | 0 |
| amazon:2 | golang-docs | 0 |
| Go standard library | regexp/syntax | 0, 1.19.0-0 |
| amazon:2023 | golang-shared | 0 |
…and 3 more
Timeline
- Oct 6, 2022 CVE Published
- Oct 15, 2022 EPSS Score (30 in total, the first dated here)
- Mar 10, 2026 Security Advisory (82 in total, the first dated here)
- Jun 15, 2026 Coalition ESS Score
- Jul 2, 2026 Distribution Patch (78 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2022-41715
vulnetix vdb fixes CVE-2022-41715
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2022-41715/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart