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

Published Oct 4, 2022
·
Updated

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.

Other sources

Golang Go is vulnerable to a denial of service, caused by the compilation of regular expressions from untrusted sources. A remote attacker could exploit this vulnerability to exhaust all available memory resources.

IBM

Memory exhaustion when compiling regular expressions in regexp/syntax

Microsoft

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.

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.

Each regexp being parsed is now limited to a 256 MB memory footprint. Regular expressions whose representation would use more space than that are now rejected. Normal use of regular expressions is unaffected.

ref: https://groups.google.com/g/golang-announce/c/xtuG5faxtaU?pli=1

Red Hat

Affected Software

42 affected componentsFixes available
redhat/openshift-serverless-clients<0:1.6.1-1.el8
0:1.6.1-1.el8
redhat/go-toolset<1.18-0:1.18.9-1.el7_9
1.18-0:1.18.9-1.el7_9
redhat/go-toolset<1.18-golang-0:1.18.9-1.el7_9
1.18-golang-0:1.18.9-1.el7_9
redhat/osbuild-composer<0:75-1.el8
0:75-1.el8
redhat/weldr-client<0:35.9-2.el8
0:35.9-2.el8
redhat/grafana<0:7.5.15-4.el8
0:7.5.15-4.el8
redhat/git-lfs<0:3.2.0-2.el8
0:3.2.0-2.el8
redhat/golang<0:1.18.9-1.el9_1
0:1.18.9-1.el9_1
redhat/grafana<0:9.0.9-2.el9
0:9.0.9-2.el9
redhat/osbuild-composer<0:76-2.el9_2
0:76-2.el9_2
redhat/weldr-client<0:35.9-1.el9
0:35.9-1.el9
redhat/git-lfs<0:3.2.0-1.el9
0:3.2.0-1.el9
redhat/golang-github-cpuguy83-md2man<0:2.0.2-4.el9
0:2.0.2-4.el9
redhat/butane<0:0.16.0-2.rhaos4.12.el8
0:0.16.0-2.rhaos4.12.el8
redhat/ignition<0:2.14.0-5.rhaos4.12.el8
0:2.14.0-5.rhaos4.12.el8
redhat/openshift-clients<0:4.12.0-202301042257.p0.g854f807.assembly.stream.el9
0:4.12.0-202301042257.p0.g854f807.assembly.stream.el9
redhat/buildah<1:1.23.4-4.rhaos4.12.el9
1:1.23.4-4.rhaos4.12.el9
redhat/conmon<2:2.1.2-4.rhaos4.12.el8
2:2.1.2-4.rhaos4.12.el8
redhat/podman<3:4.2.0-7.rhaos4.12.el9
3:4.2.0-7.rhaos4.12.el9
redhat/runc<3:1.1.6-4.rhaos4.12.el8
3:1.1.6-4.rhaos4.12.el8
redhat/skopeo<2:1.9.4-3.rhaos4.12.el9
2:1.9.4-3.rhaos4.12.el9
redhat/etcd<0:3.3.23-12.el8
0:3.3.23-12.el8
redhat/skupper-cli<0:1.4.1-2.el8
0:1.4.1-2.el8
redhat/skupper-router<0:2.4.1-2.el8
0:2.4.1-2.el8
redhat/skupper-cli<0:1.4.1-2.el9
0:1.4.1-2.el9
redhat/skupper-router<0:2.4.1-2.el9
0:2.4.1-2.el9
debian/golang-1.15<=1.15.15-1~deb11u4
debian/golang-1.19
1.19.8-2
redhat/go<1.19.2
1.19.2
redhat/go<1.18.7
1.18.7
Golang Go<1.18.7
Golang Go>=1.19.0<1.19.2
IBM Data Virtualization on Cloud Pak for Data<=3.0
IBM Watson Query on Cloud Pak for Data<=2.2
IBM Watson Query on Cloud Pak for Data<=2.1
IBM Watson Query on Cloud Pak for Data<=2.0
IBM Data Virtualization on Cloud Pak for Data<=1.8
IBM Data Virtualization on Cloud Pak for Data<=1.7
Microsoft cbl2 golang 1.19.5-1
Microsoft cm1 golang 1.17.13-2
Microsoft cbl2 golang 1.21.6-1
Microsoft cbl2 golang 1.17.13-2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/openshift-serverless-clients to a version that resolves this vulnerability.

    Fixed in 0:1.6.1-1.el8
  2. Upgrade

    Upgrade redhat/go-toolset to a version that resolves this vulnerability.

    Fixed in 1.18-0:1.18.9-1.el7_9
  3. Upgrade

    Upgrade redhat/go-toolset to a version that resolves this vulnerability.

    Fixed in 1.18-golang-0:1.18.9-1.el7_9
  4. Upgrade

    Upgrade redhat/osbuild-composer to a version that resolves this vulnerability.

    Fixed in 0:75-1.el8
  5. Upgrade

    Upgrade redhat/weldr-client to a version that resolves this vulnerability.

    Fixed in 0:35.9-2.el8
  6. Upgrade

    Upgrade redhat/grafana to a version that resolves this vulnerability.

    Fixed in 0:7.5.15-4.el8
  7. Upgrade

    Upgrade redhat/git-lfs to a version that resolves this vulnerability.

    Fixed in 0:3.2.0-2.el8
  8. Upgrade

    Upgrade redhat/golang to a version that resolves this vulnerability.

    Fixed in 0:1.18.9-1.el9_1
  9. Upgrade

    Upgrade redhat/grafana to a version that resolves this vulnerability.

    Fixed in 0:9.0.9-2.el9
  10. Upgrade

    Upgrade redhat/osbuild-composer to a version that resolves this vulnerability.

    Fixed in 0:76-2.el9_2
  11. Upgrade

    Upgrade redhat/weldr-client to a version that resolves this vulnerability.

    Fixed in 0:35.9-1.el9
  12. Upgrade

    Upgrade redhat/git-lfs to a version that resolves this vulnerability.

    Fixed in 0:3.2.0-1.el9
  13. Upgrade

    Upgrade redhat/golang-github-cpuguy83-md2man to a version that resolves this vulnerability.

    Fixed in 0:2.0.2-4.el9
  14. Upgrade

    Upgrade redhat/butane to a version that resolves this vulnerability.

    Fixed in 0:0.16.0-2.rhaos4.12.el8
  15. Upgrade

    Upgrade redhat/ignition to a version that resolves this vulnerability.

    Fixed in 0:2.14.0-5.rhaos4.12.el8
  16. Upgrade

    Upgrade redhat/openshift-clients to a version that resolves this vulnerability.

    Fixed in 0:4.12.0-202301042257.p0.g854f807.assembly.stream.el9
  17. Upgrade

    Upgrade redhat/buildah to a version that resolves this vulnerability.

    Fixed in 1:1.23.4-4.rhaos4.12.el9
  18. Upgrade

    Upgrade redhat/conmon to a version that resolves this vulnerability.

    Fixed in 2:2.1.2-4.rhaos4.12.el8
  19. Upgrade

    Upgrade redhat/podman to a version that resolves this vulnerability.

    Fixed in 3:4.2.0-7.rhaos4.12.el9
  20. Upgrade

    Upgrade redhat/runc to a version that resolves this vulnerability.

    Fixed in 3:1.1.6-4.rhaos4.12.el8
  21. Upgrade

    Upgrade redhat/skopeo to a version that resolves this vulnerability.

    Fixed in 2:1.9.4-3.rhaos4.12.el9
  22. Upgrade

    Upgrade redhat/etcd to a version that resolves this vulnerability.

    Fixed in 0:3.3.23-12.el8
  23. Upgrade

    Upgrade redhat/skupper-cli to a version that resolves this vulnerability.

    Fixed in 0:1.4.1-2.el8
  24. Upgrade

    Upgrade redhat/skupper-router to a version that resolves this vulnerability.

    Fixed in 0:2.4.1-2.el8
  25. Upgrade

    Upgrade redhat/skupper-cli to a version that resolves this vulnerability.

    Fixed in 0:1.4.1-2.el9
  26. Upgrade

    Upgrade redhat/skupper-router to a version that resolves this vulnerability.

    Fixed in 0:2.4.1-2.el9
  27. Upgrade

    Upgrade debian/golang-1.19 to a version that resolves this vulnerability.

    Fixed in 1.19.8-2
  28. Upgrade

    Upgrade redhat/go to a version that resolves this vulnerability.

    Fixed in 1.19.2
  29. Upgrade

    Upgrade redhat/go to a version that resolves this vulnerability.

    Fixed in 1.18.7

Event History

Oct 4, 2022
CVE Published
12:00 AM
Oct 7, 2022
Data Sourced
via Red Hat·04:57 AM
DescriptionSeverityAffected Software
Oct 14, 2022
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
DescriptionWeakness
Data Sourced
via NVD·03:16 PM
RemedyDescriptionSeverityAffected Software
Oct 19, 2022
Data Sourced
via Microsoft·07:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·07:00 AM
Affected Software
Updated
via Microsoft·07:00 AM
DescriptionSeverity
Oct 10, 2024
Data Sourced
via Ubuntu·01:15 PM
RemedyDescriptionSeverityAffected Software
Data Sourced
via Launchpad·01:16 PM
Description
Aug 15, 2025
Data Sourced
via IBM·03:29 PM
DescriptionAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the vulnerability ID?

The vulnerability ID is CVE-2022-41715.

2

What is the severity of CVE-2022-41715?

The severity of CVE-2022-41715 is high.

3

Which software packages are affected by CVE-2022-41715?

The affected software packages are go, openshift-serverless-clients, go-toolset, osbuild-composer, weldr-client, grafana, git-lfs, golang, golang-github-cpuguy83-md2man, butane, ignition, openshift-clients, buildah, conmon, podman, runc, skopeo, etcd, skupper-cli, and skupper-router.

4

How can I fix CVE-2022-41715?

To fix CVE-2022-41715, update the affected software packages to the specified versions.

5

Where can I find more information about CVE-2022-41715?

You can find more information about CVE-2022-41715 at the following references: [link1], [link2], [link3].

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203