CVE-2022-1962: Stack exhaustion due to deeply nested types in go/parser

Published Jul 12, 2022
·
Updated

A flaw was found in the golang standard library, go/parser. When calling any Parse functions on the Go source code, which contains deeply nested types or declarations, a panic can occur due to stack exhaustion. This issue allows an attacker to impact system availability.

Other sources

Calling any of the Parse functions on Go source code which contains deeply nested types or declarations can cause a panic due to stack exhaustion.

Red Hat

Stack exhaustion due to deeply nested types in go/parser

Microsoft

Uncontrolled recursion in the Parse functions in go/parser before Go 1.17.12 and Go 1.18.4 allow an attacker to cause a panic due to stack exhaustion via deeply nested types or declarations.

Affected Software

16 affected componentsFixes available
redhat/skupper-cli<0:1.0.2-2.el8
0:1.0.2-2.el8
redhat/openshift-serverless-clients<0:1.3.1-4.el8
0:1.3.1-4.el8
redhat/go-toolset<1.17-golang-0:1.17.12-1.el7_9
1.17-golang-0:1.17.12-1.el7_9
redhat/grafana<0:7.5.15-3.el8
0:7.5.15-3.el8
redhat/golang<0:1.17.12-1.el9_0
0:1.17.12-1.el9_0
redhat/grafana<0:7.5.15-3.el9
0:7.5.15-3.el9
redhat/kubevirt<0:4.12.0-1057.el7
0:4.12.0-1057.el7
redhat/kubevirt<0:4.12.0-1057.el8
0:4.12.0-1057.el8
debian/golang-1.15<=1.15.15-1~deb11u4
debian/golang-1.19
1.19.8-2
Golang Go<1.17.12
Golang Go>=1.18.0<1.18.4
redhat/golang<1.18.4
1.18.4
redhat/golang<1.17.12
1.17.12
Microsoft cm1 golang 1.18.5-1<1.18.5-1
1.18.5-1
Microsoft cbl2 golang 1.18.5-1<1.18.5-1
1.18.5-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

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

    Fixed in 0:1.0.2-2.el8
  2. Upgrade

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

    Fixed in 0:1.3.1-4.el8
  3. Upgrade

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

    Fixed in 1.17-golang-0:1.17.12-1.el7_9
  4. Upgrade

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

    Fixed in 0:7.5.15-3.el8
  5. Upgrade

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

    Fixed in 0:1.17.12-1.el9_0
  6. Upgrade

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

    Fixed in 0:7.5.15-3.el9
  7. Upgrade

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

    Fixed in 0:4.12.0-1057.el7
  8. Upgrade

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

    Fixed in 0:4.12.0-1057.el8
  9. Upgrade

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

    Fixed in 1.19.8-2
  10. Upgrade

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

    Fixed in 1.18.4
  11. Upgrade

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

    Fixed in 1.17.12
  12. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 1.18.5-1
  13. Upgrade

    Upgrade golang standard library (go/parser) to a version that resolves this vulnerability.

    Fixed in Go 1.17.12
  14. Upgrade

    Upgrade golang standard library (go/parser) to a version that resolves this vulnerability.

    Fixed in Go 1.18.4
  15. Compensating control

    Avoid calling go/parser Parse functions on Go source code that contains deeply nested types or declarations, to prevent stack exhaustion leading to a panic.

Event History

Jul 12, 2022
CVE Published
12:00 AM
Jul 14, 2022
Data Sourced
via Red Hat·08:40 PM
DescriptionSeverityAffected Software
Aug 9, 2022
CVE Published
via MITRE·08:18 PM
Data Sourced
via MITRE·08:18 PM
DescriptionWeakness
Aug 10, 2022
Data Sourced
via NVD·08:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Aug 16, 2022
Data Sourced
via Microsoft·07:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·07:00 AM
Affected Software
Updated
via Microsoft·07:00 AM
Affected Software
Updated
via Microsoft·07:00 AM
DescriptionSeverityWeakness
Oct 10, 2024
Data Sourced
via Ubuntu·01:15 PM
RemedyDescriptionSeverityAffected Software
Data Sourced
via Launchpad·01:16 PM
Description

Frequently Asked Questions

1

What is CVE-2022-1962?

CVE-2022-1962 is a vulnerability in go/parser, a part of the golang standard library, that can lead to a system panic and impact system availability when parsing deeply nested types or declarations in Go source code.

2

What is the severity of CVE-2022-1962?

CVE-2022-1962 has a severity rating of medium with a CVSS score of 5.5.

3

How does CVE-2022-1962 affect the system?

CVE-2022-1962 can cause a panic and lead to system unavailability when calling Parse functions on Go source code that contains deeply nested types or declarations.

4

How can I fix CVE-2022-1962?

To fix CVE-2022-1962, update golang to version 1.18.4 or 1.17.12, depending on your current version.

5

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

You can find more information about CVE-2022-1962 on the Red Hat Bugzilla page and the Red Hat Advisory page.

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