The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
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
    • 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-34558

CVE-2021-34558: Golang Go TLS Certificate Vulnerability

CVE-2021-34558 is a TLS certificate validation flaw in Golang Go that allows malicious servers to cause client panic during RSA key exchange. This article covers technical details, affected versions, and mitigation.

Published: February 25, 2026

CVE-2021-34558 Overview

The crypto/tls package in Go through version 1.16.5 contains an improper certificate validation vulnerability that fails to properly assert that the type of public key in an X.509 certificate matches the expected type when performing RSA-based key exchanges. This flaw allows a malicious TLS server to cause a TLS client to panic, resulting in a denial of service condition.

Critical Impact

A malicious TLS server can exploit this vulnerability to crash Go applications acting as TLS clients by sending certificates with mismatched public key types during the TLS handshake process.

Affected Products

  • Golang Go (versions through 1.16.5)
  • Fedora Project Fedora 33 and 34
  • NetApp Cloud Insights Telegraf
  • NetApp StorageGRID
  • NetApp Trident
  • Oracle TimesTen In-Memory Database

Discovery Timeline

  • 2021-07-15 - CVE-2021-34558 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2021-34558

Vulnerability Analysis

This vulnerability exists in the Go programming language's crypto/tls package, which handles TLS/SSL connections. The core issue stems from inadequate type checking when processing X.509 certificates during RSA-based key exchanges.

When a Go TLS client initiates a connection with a server, the server presents an X.509 certificate containing a public key. The crypto/tls package expects specific public key types (RSA) for RSA-based cipher suites. However, the vulnerable versions fail to validate that the certificate's public key type actually matches the expected RSA type before attempting cryptographic operations.

If a malicious server presents a certificate with an incompatible public key type (such as an ECDSA key) while negotiating an RSA cipher suite, the Go TLS client attempts to use this incompatible key in RSA operations, triggering a runtime panic that crashes the application.

Root Cause

The root cause is CWE-295 (Improper Certificate Validation). The crypto/tls package does not perform adequate type assertions on the public key extracted from X.509 certificates before using them in cryptographic operations. This missing validation allows type confusion when a certificate's public key type doesn't match the negotiated cipher suite requirements.

Attack Vector

The attack is network-based and requires user interaction in the form of a TLS client connecting to a malicious server. An attacker must control or compromise a TLS server that the victim client connects to. The attack sequence involves:

  1. The attacker sets up a malicious TLS server or performs a man-in-the-middle attack
  2. The victim's Go application (acting as a TLS client) initiates a connection
  3. During the TLS handshake, the malicious server negotiates an RSA-based cipher suite
  4. The server presents a certificate containing a non-RSA public key (e.g., ECDSA)
  5. The Go TLS client fails to validate the key type and panics when attempting RSA operations with the incompatible key

This vulnerability can be exploited to cause denial of service against any Go application that acts as a TLS client connecting to untrusted servers.

Detection Methods for CVE-2021-34558

Indicators of Compromise

  • Go application crashes with panic messages related to type assertions in crypto/tls package
  • Unexpected TLS client terminations when connecting to external servers
  • Stack traces showing failures in RSA key exchange operations with type mismatch errors
  • Anomalous TLS handshake patterns where servers present certificates with public key types inconsistent with negotiated cipher suites

Detection Strategies

  • Monitor Go applications for panic events, particularly those with stack traces referencing crypto/tls and key type operations
  • Implement application-level logging to capture TLS handshake failures and certificate details
  • Use network monitoring to detect unusual TLS certificate presentations during handshakes
  • Deploy runtime protection solutions that can detect and prevent application crashes from exploitation attempts

Monitoring Recommendations

  • Enable verbose TLS debugging in development environments to identify potential exploitation attempts
  • Set up alerting for Go application restarts or crashes in production environments
  • Monitor for connections to untrusted or newly registered domains that may host malicious TLS servers
  • Implement application performance monitoring to track TLS connection success rates and failure patterns

How to Mitigate CVE-2021-34558

Immediate Actions Required

  • Upgrade Go to version 1.16.6 or later, which contains the fix for this vulnerability
  • Audit all applications built with Go versions 1.16.5 and earlier that act as TLS clients
  • Rebuild and redeploy affected applications with a patched Go version
  • Consider implementing network-level controls to limit TLS client connections to known, trusted servers

Patch Information

The Go team addressed this vulnerability in Go 1.16.6 and Go 1.15.14. Organizations should update their Go installations and rebuild affected applications. Detailed release information is available in the Go Release Notes for 1.16. Additional vendor-specific patches are available from Oracle Security Alert October 2021, Oracle Security Alert January 2022, and the NetApp Security Advisory.

Workarounds

  • Restrict TLS client connections to trusted, known-good servers only
  • Implement network-level filtering to prevent connections to potentially malicious endpoints
  • Deploy application-level recovery mechanisms to handle panics gracefully and restart services automatically
  • Use a reverse proxy or TLS termination point that validates certificates before forwarding connections to Go applications
bash
# Verify Go version and upgrade if needed
go version
# If version is 1.16.5 or earlier, upgrade to 1.16.6+

# For systems using package managers (Fedora example)
sudo dnf update golang

# Rebuild affected applications after upgrading Go
go build -o myapp ./cmd/myapp

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

  • Vulnerability Details
  • TypeOther

  • Vendor/TechGolang Go

  • SeverityMEDIUM

  • CVSS Score6.5

  • EPSS Probability1.47%

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

  • Golang Announcement Thread

  • Fedora Package Announcement

  • Fedora Package Update Notice

  • Fedora Package Security Update

  • Fedora Package Update Notice

  • Fedora Security Notification

  • Fedora Package Update Notice

  • Fedora Package Update Notification

  • Fedora Package Update Notice

  • Fedora Package Update Notice

  • Gentoo GLSA 202208-02

  • NetApp Security Advisory
  • Vendor Resources
  • Go Release Notes for 1.16

  • Oracle Security Alert January 2022

  • Oracle Security Alert October 2021
  • Related CVEs
  • CVE-2025-0913: Golang Go Symlink Handling Vulnerability

  • CVE-2022-23806: Golang Go Elliptic Curve Vulnerability

  • CVE-2023-29402: Golang Go RCE Vulnerability

  • CVE-2023-29405: Golang Go RCE Vulnerability
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