GoApplication · Golang

CVE-2021-38297

CRITICAL · 9.8 CVSS v3.1 Published 2021-10-18
Fix available
A fix is available. Upgrade to 1.16.9 / 1.17.2 or later.
See remediation →
100/100
Remediation priority · Urgent
Remotely reachable No privileges Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

Buffer overflow vulnerability in Go's WebAssembly runtime (GOARCH=wasm, GOOS=js) allows attackers to execute arbitrary code via large arguments in WASM function invocations. The issue affects Go versions prior to 1.16.9 and 1.17.x prior to 1.17.2.

MitigationUpgrade Go to version 1.16.9 or later (or 1.17.2 or later) and rebuild all affected WASM modules to incorporate the security fix.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
GoApplication
Affected:< 1.16.9>= 1.17.0, < 1.17.2
FedoraOperating system
Affected:= 34= 35

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Check installed Go version
    Run 'go version' to see the Go runtime version currently installed
    Affected if The version shown is earlier than 1.16.9, or is 1.17.0 or 1.17.1 (anything from 1.17.0 up to but not including 1.17.2)
  2. Verify WebAssembly build target
    Inspect your build configuration or Makefile for GOARCH=wasm or GOOS=js flags, or check if any .wasm binaries exist in your project
    Affected if The project is built with GOARCH=wasm or produces WebAssembly binaries
  3. Check for JS interop usage
    Search source code for '//go:build wasm' or '// +build wasm' build tags, or look for imports of 'syscall/js' package
    Affected if The code uses the syscall/js package for JavaScript interop in WebAssembly builds
  4. Identify deployed WASM modules
    Locate any .wasm binary files deployed in your environment and note their build timestamp or associated Go version metadata
    Affected if The .wasm modules were compiled with an affected Go version (prior to 1.16.9 or 1.17.0-1.17.1)

You are affected if you run Go versions below 1.16.9 or between 1.17.0 and 1.17.1, AND you build or deploy WebAssembly modules (GOARCH=wasm) that use JavaScript interop.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 1.16.9 / 1.17.2 or later
Fixed in 1.16.91.17.2
Interim mitigation

Upgrade Go to version 1.16.9 or later (or 1.17.2 or later) and rebuild all affected WASM modules to incorporate the security fix.

Recommended fix High confidence

Go 1.16.9, Go 1.17.2, or later stable releases

  1. 1. Identify the current Go version by running: go version
  2. 2. If running Go < 1.16.9 or >= 1.17.0 but < 1.17.2, upgrade is required
  3. 3. Download the appropriate Go version for your platform from https://golang.org/dl/ (Go 1.16.9 or Go 1.17.2 or later)
  4. 4. Extract the downloaded archive to /usr/local on Linux or follow OS-specific installation instructions
  5. 5. Verify the upgrade by running: go version
  6. 6. If using GOARCH=wasm GOOS=js for WebAssembly, ensure your code handles arguments within safe size limits as a defense-in-depth measure
Caveat Minor version upgrades typically have minimal breaking changes; however, test WebAssembly functionality after upgrading

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Go Scoped from the published advisory
  • Consultation4.0 h
  • Implementation8.0 h
  • Testing8.0 h
  • Review / QA4.0 h
24.0 hours of engineering $4,160
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $6,656.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2021-38297 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2021-38297 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data