VDB

CVE-2022-41715

CVE-2022-41715 PUBLISHED

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.

PackageEcosystemFixed in
stdlibGo Modules1.19.2, 1.18.7
regexp/syntaxGo Modules1.19.2, 1.18.7
kubeflow-katibWolfi0.19.0-r40, 0.19.0-r31
golang-testsAmazon Linux1.19.3-2.amzn2023.0.2, 1.18.8-1.amzn2.0.1
golang-miscAmazon Linux1.19.3-2.amzn2023.0.2, 1.18.8-1.amzn2.0.1
golang-srcAmazon Linux1.19.3-2.amzn2023.0.2, 1.18.8-1.amzn2.0.1
golang-raceAmazon Linux1.19.3-2.amzn2023.0.2, 1.18.8-1.amzn2.0.1
golistAmazon Linux0.10.1-11.amzn2023.0.3, 0.10.1-10.amzn2.0.2
golangAmazon Linux1.19.3-2.amzn2023.0.2, 1.18.8-1.amzn2.0.1
golang-sharedAmazon Linux1.19.3-2.amzn2023.0.2, 1.18.8-1.amzn2.0.1
golang-docsAmazon Linux1.19.3-2.amzn2023.0.2, 1.18.8-1.amzn2.0.1
kubeflow-katibChainguard0.19.0-r40, 0.19.0-r31

5 more packages have a fixed version. See every fix in Lookup.

Affected products

VendorProductVersions
Go standard libraryregexp/syntax0, 1.19.0-0
wolfikubeflow-katib0, 0
amazon:2023golang-tests0
amazon:2golang-misc0
amazon:2023golang-src0
amazon:2golang-race0
amazon:2023golist0
amazon:2golang0
amazon:2golang-tests0
amazon:2golang-shared0
amazon:2023golang-race0
amazon:2golist0
amazon:2golang-src0
amazon:2023golang-docs0
chainguardkubeflow-katib0, 0
amazon:2023golang0
amazon:2023golang-bin0
amazon:2golang-docs0
Go standard libraryregexp/syntax0, 1.19.0-0
amazon:2023golang-shared0

…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

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›