cve.bz

CVE-2021-38297 Classic Buffer Overflow

9.8 criticalEPSS 11%Fix available

Critical (9.8). EPSS 11% estimated probability of exploitation activity in the next 30 days. Fixed in toolchain 1.16.9, 1.17.2.

On this page
Go before 1.16.9 and 1.17.x before 1.17.2 has a Buffer Overflow via large arguments in a function invocation from a WASM module, when GOARCH=wasm GOOS=js is used.

Severity

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
11% (unchanged from 11% a week ago; 11% 30 days ago) estimated probability of exploitation activity in the next 30 days; 96th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-120 Buffer Copy without Checking Size of Input (Classic Buffer Overflow)
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-38297 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-38297?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-38297?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-38297 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
golang:gobefore 1.16.9
golang:gofrom 1.17.0 before 1.17.2
fedoraproject:fedora34
fedoraproject:fedora35

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GO-2022-0247Gotoolchain<1.16.9
>=1.17.0-0 <1.17.2
1.16.9, 1.17.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10golang-1.111.11.6-1+deb10u6DLA-3395-1
Debian11golang-1.151.15.15-1~deb11u2DEBIAN-CVE-2021-38297
Ubuntu16.04:LTSgolang-1.6, golang-1.10no fix listedUBUNTU-CVE-2021-38297
Ubuntu18.04:LTSgolang-1.8, golang-1.9no fix listedUBUNTU-CVE-2021-38297
Ubuntu20.04:LTSgolang-1.13, golang-1.14no fix listedUBUNTU-CVE-2021-38297
UbuntuPro:16.04:LTS, Pro:22.04:LTSgolang-1.13no fix listedUBUNTU-CVE-2021-38297
UbuntuPro:18.04:LTSgolang-1.13, golang-1.16no fix listedUBUNTU-CVE-2021-38297
UbuntuPro:20.04:LTSgolang-1.16no fix listedUBUNTU-CVE-2021-38297
Red Hatenterprise_linux:8::appstreamdelve, delve-debuginfo, delve-debugsource0:1.7.2-1.module+el8.6.0+12972+ebab5911RHSA-2022:1819
Red Hatenterprise_linux:8::appstreamgolang, go-toolset, golang-bin and 5 more0:1.17.7-1.module+el8.6.0+14297+32a15e19RHSA-2022:1819
Red Hatserverless:1.0::el8openshift-serverless-clients0:0.26.0-2.el8RHSA-2022:0432
SUSELinux Enterprise Module for Development Tools 15 SP2, Linux Enterprise Module for Development Tools 15 SP3go1.161.16.9-1.29.1SUSE-SU-2021:3487-1
SUSELinux Enterprise Module for Development Tools 15 SP2, Linux Enterprise Module for Development Tools 15 SP3go1.171.17.2-1.6.2SUSE-SU-2021:3488-1
SUSELinux Enterprise Module for Public Cloud 12google-guest-agent20230221.00-1.29.1SUSE-SU-2023:0603-1
SUSELinux Enterprise Module for Public Cloud 12google-osconfig-agent20230222.00-1.20.1SUSE-SU-2023:0601-1
SUSELinux Enterprise Module for Public Cloud 15 SP1, Linux Enterprise Module for Public Cloud 15 SP2, Linux Enterprise Module for Public Cloud 15 SP3 and 1 moregoogle-guest-agent20230221.00-150000.1.34.1SUSE-SU-2023:0600-1
SUSELinux Enterprise Module for Public Cloud 15 SP1, Linux Enterprise Module for Public Cloud 15 SP2, Linux Enterprise Module for Public Cloud 15 SP3 and 1 moregoogle-osconfig-agent20230222.00-150000.1.27.1SUSE-SU-2023:0602-1
openSUSELeap 15.2go1.161.16.9-lp152.14.1openSUSE-SU-2021:1420-1
openSUSELeap 15.3go1.161.16.9-1.29.1openSUSE-SU-2021:3487-1
openSUSELeap 15.3go1.171.17.2-1.6.2openSUSE-SU-2021:3488-1
openSUSELeap 15.4google-guest-agent20230221.00-150000.1.34.1SUSE-SU-2023:0600-1
openSUSELeap 15.4google-osconfig-agent20230222.00-150000.1.27.1SUSE-SU-2023:0602-1
openSUSETumbleweedgo1.161.16.9-1.1openSUSE-SU-2024:11567-1
openSUSETumbleweedgo1.171.17.2-1.1openSUSE-SU-2024:11568-1
openSUSETumbleweedgoogle-guest-agent20230221.00-2.1openSUSE-SU-2024:12758-1
openSUSETumbleweedgoogle-osconfig-agent20230222.00-2.1openSUSE-SU-2024:12759-1
AlmaLinux8delve1.7.2-1.module_el8.6.0+2736+ec10aba8ALSA-2022:1819
AlmaLinux8golang, go-toolset, golang-bin and 5 more1.17.7-1.module_el8.6.0+2736+ec10aba8ALSA-2022:1819
Rocky Linux8delve0:1.7.2-1.module+el8.6.0+824+8e984c20RLSA-2022:1819
Rocky Linux8golang, go-toolset0:1.17.7-1.module+el8.6.0+824+8e984c20RLSA-2022:1819
Alpinev3.15, v3.16, v3.17 and 7 morego1.17.2-r0ALPINE-CVE-2021-38297
Azure Linux2golang1.17.8-1AZL-6450

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

* Although this flaw has a higher CVSS score, in a strict sense, the flaw could possibly enable code exec, either Red Hat products don't use WASM, or don't expose WASM functions in a way that makes code exec possible. For this reason, the Red Hat impact for this flaw is Moderate.

* Because the flawed code is not actually used in Service Telemetry Framework1.3, no update will be provided at this time for STF's sg-core-container.

*For a WASM Module to be vulnerable, it needs to be built using GOARCH=wasm GOOS=js (build options for WebAssembly).

*CVE-2021-38297 is a vulnerability that affects Go (golang). It has been fixed in versions 1.17.2 and 1.16.9.

*CVE-2021-38297 does not affect the OpenShift Container Platform (OCP) because it does not build anything with GOARCH=wasm GOOS=js. Hence, OCP-based services are not affected either.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

ProductPackageStateAdvisory
Openshift Serveless 1.20openshift-serverless-1/client-kn-rhel8:0.26.0-1Fixed 2022-02-03RHSA-2022:0434
Openshift Serveless 1.20openshift-serverless-1/eventing-apiserver-receive-adapter-rhel8:0.26.0-1Fixed 2022-02-03RHSA-2022:0434
Openshift Serveless 1.20openshift-serverless-1/eventing-controller-rhel8:0.26.0-1Fixed 2022-02-03RHSA-2022:0434
Openshift Serveless 1.20openshift-serverless-1/eventing-in-memory-channel-controller-rhel8:0.26.0-1Fixed 2022-02-03RHSA-2022:0434
Openshift Serveless 1.20openshift-serverless-1/eventing-in-memory-channel-dispatcher-rhel8:0.26.0-1Fixed 2022-02-03RHSA-2022:0434
Openshift Serveless 1.20openshift-serverless-1/eventing-mtbroker-filter-rhel8:0.26.0-1Fixed 2022-02-03RHSA-2022:0434
Openshift Serveless 1.20openshift-serverless-1/eventing-mtbroker-ingress-rhel8:0.26.0-1Fixed 2022-02-03RHSA-2022:0434
Openshift Serveless 1.20openshift-serverless-1/eventing-mtchannel-broker-rhel8:0.26.0-1Fixed 2022-02-03RHSA-2022:0434
Openshift Serveless 1.20openshift-serverless-1/eventing-mtping-rhel8:0.26.0-1Fixed 2022-02-03RHSA-2022:0434
Openshift Serveless 1.20openshift-serverless-1/eventing-storage-version-migration-rhel8:0.26.0-1Fixed 2022-02-03RHSA-2022:0434
Distributed Tracing Jaeger 1distributed-tracing/jaeger-all-in-one-rhel8Not affected
Migration Toolkit for Containersrhmtc/openshift-migration-rhel8-operatorNot affected
Migration Toolkit for Virtualizationmigration-toolkit-virtualization/mtv-controller-rhel9Not affected
OpenShift Serverlessknative-eventingAffected
OpenShift Serverlessknative-servingAffected
OpenShift Service Mesh 2.0servicemeshNot affected
OpenShift Service Mesh 2.0servicemesh-grafanaNot affected
OpenShift Service Mesh 2.0servicemesh-operatorNot affected
OpenShift Service Mesh 2.0servicemesh-prometheusNot affected
Red Hat Advanced Cluster Security 3roxAffected
144 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-38297.

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-120 (13).

References

Check your stackJSON