Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2021-38297

CVE-2021-38297: Golang Go Buffer Overflow Vulnerability

CVE-2021-38297 is a buffer overflow vulnerability in Golang Go affecting WASM modules when GOARCH=wasm GOOS=js is used. This article covers the technical details, affected versions, security impact, and mitigation strategies.

Published: February 25, 2026

CVE-2021-38297 Overview

CVE-2021-38297 is a critical buffer overflow vulnerability affecting Go programming language versions before 1.16.9 and 1.17.x before 1.17.2. The vulnerability occurs when large arguments are passed in a function invocation from a WebAssembly (WASM) module when compiled with GOARCH=wasm and GOOS=js settings.

This buffer overflow condition allows attackers to potentially execute arbitrary code or cause denial of service conditions by exploiting the improper handling of oversized arguments during WASM function calls.

Critical Impact

This vulnerability enables remote attackers to trigger a buffer overflow through maliciously crafted WASM module function calls, potentially leading to arbitrary code execution, memory corruption, or complete system compromise in affected Go applications.

Affected Products

  • Golang Go versions prior to 1.16.9
  • Golang Go versions 1.17.x prior to 1.17.2
  • Fedora Project Fedora 34 and 35 (via bundled Go packages)

Discovery Timeline

  • 2021-10-18 - CVE-2021-38297 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2021-38297

Vulnerability Analysis

The vulnerability resides in Go's WebAssembly runtime implementation. When Go code is compiled to WebAssembly using the GOARCH=wasm and GOOS=js environment variables, the resulting WASM module contains a runtime that handles function invocations between JavaScript and Go code.

The flaw occurs during the processing of function arguments passed from the WASM module. When exceptionally large arguments are provided during a function invocation, the Go runtime fails to properly validate the argument size before copying data into a fixed-size buffer. This lack of bounds checking leads to a classic buffer overflow condition (CWE-120).

The network-based attack vector makes this particularly dangerous for web applications and services that execute Go-compiled WASM modules in browser or server-side JavaScript environments. An attacker can craft malicious inputs that trigger the overflow remotely without requiring authentication or user interaction.

Root Cause

The root cause is improper input validation in the Go WASM runtime's argument handling code. When processing function invocation arguments from the WASM module, the runtime does not adequately verify that the argument size fits within allocated buffer boundaries. This allows an attacker to supply arguments that exceed the expected maximum size, causing memory to be written beyond the intended buffer limits.

The vulnerability is classified under CWE-120 (Buffer Copy without Checking Size of Input), which describes scenarios where data is copied to a buffer without first checking that the data will fit within the buffer's capacity.

Attack Vector

The attack vector for CVE-2021-38297 is network-based and requires no privileges or user interaction. An attacker can exploit this vulnerability by:

  1. Targeting a web application or service that uses Go code compiled to WebAssembly
  2. Crafting a malicious WASM function call with oversized arguments
  3. Triggering the buffer overflow when the Go runtime processes the arguments
  4. Potentially achieving arbitrary code execution or causing a denial of service

The exploitation mechanism involves passing excessively large arguments through the WASM module's function invocation interface. When these arguments are processed by the vulnerable Go runtime, the buffer overflow occurs, potentially overwriting adjacent memory regions including return addresses or other critical data structures.

For technical details on the vulnerability mechanism, see the Golang Announce Message.

Detection Methods for CVE-2021-38297

Indicators of Compromise

  • Unexpected crashes or segmentation faults in Go applications compiled to WASM
  • Memory corruption errors in browser JavaScript consoles when running Go WASM modules
  • Abnormal memory usage patterns in applications utilizing Go WASM modules
  • Application logs showing unusual function call patterns with large argument sizes

Detection Strategies

  • Implement version checking for Go runtime in deployed WASM modules to identify vulnerable versions (< 1.16.9 or 1.17.x < 1.17.2)
  • Deploy web application firewalls (WAF) to monitor for abnormally large payloads targeting WASM endpoints
  • Use application security monitoring to detect memory corruption attempts or unusual crash patterns
  • Integrate static analysis tools to identify Go applications compiled with vulnerable versions

Monitoring Recommendations

  • Monitor application logs for crashes related to WASM function invocations
  • Set up alerts for memory consumption anomalies in services running Go WASM modules
  • Implement runtime application self-protection (RASP) to detect buffer overflow attempts
  • Enable browser console logging and monitoring for client-side Go WASM applications

How to Mitigate CVE-2021-38297

Immediate Actions Required

  • Upgrade Go to version 1.16.9 or 1.17.2 or later immediately
  • Recompile all WASM modules using the patched Go version
  • Audit deployed applications to identify those using Go WASM compilation
  • Consider temporarily disabling affected WASM modules until patches can be applied

Patch Information

The Go team has released patched versions to address this vulnerability. Users should upgrade to Go 1.16.9 or 1.17.2 (or later versions) to remediate this issue. After upgrading, all WASM modules must be recompiled using the patched Go toolchain.

For additional information, refer to the following security advisories:

  • Golang Announce Message
  • Gentoo GLSA Advisory
  • NetApp Security Advisory
  • Debian LTS Announcement

Workarounds

  • Avoid using GOARCH=wasm and GOOS=js compilation targets until patching is complete
  • Implement input validation at the JavaScript layer before invoking WASM functions
  • Deploy network-level controls to limit payload sizes to WASM endpoints
  • Consider sandboxing WASM execution environments to limit potential impact
bash
# Upgrade Go to patched version
go version  # Check current version
# Download and install Go 1.16.9+ or 1.17.2+
# Recompile WASM modules
GOARCH=wasm GOOS=js go build -o app.wasm ./main.go

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechGolang

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability10.63%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-120
  • Technical References
  • Golang Announce Forum

  • Golang Announce Message

  • Debian LTS Announcement

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Gentoo GLSA Advisory

  • NetApp Security Advisory
  • Related CVEs
  • CVE-2024-9355: Golang FIPS OpenSSL Buffer Overflow Flaw

  • CVE-2025-68121: Golang Go Auth Bypass Vulnerability

  • CVE-2025-47911: Go html.Parse DoS Vulnerability

  • CVE-2025-58190: Golang x/net/html DoS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English