A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
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-2025-58181

CVE-2025-58181: Golang Crypto SSH Server DOS Vulnerability

CVE-2025-58181 is a denial of service vulnerability in Golang Crypto SSH servers caused by improper validation of GSSAPI authentication requests, leading to unbounded memory consumption. This article covers technical details, affected versions, impact, and mitigation strategies.

Published: May 26, 2026

CVE-2025-58181 Overview

CVE-2025-58181 affects SSH servers built with the golang.org/x/crypto/ssh package. The vulnerability resides in the handling of Generic Security Services Application Program Interface (GSSAPI) authentication requests. The server does not validate the number of mechanisms specified in an incoming request, allowing a remote unauthenticated attacker to trigger unbounded memory consumption. This results in a denial-of-service (DoS) condition against affected SSH services. The flaw is tracked by Go's vulnerability database as GO-2025-4134 and is categorized as [CWE-770]: Allocation of Resources Without Limits or Throttling.

Critical Impact

Remote unauthenticated attackers can exhaust server memory by sending malformed GSSAPI authentication requests, leading to availability loss on SSH services built with golang.org/x/crypto/ssh.

Affected Products

  • golang.org/x/crypto/ssh (Go crypto module) — versions prior to the fix in change go.dev/cl/721961
  • Any SSH server application built on top of the affected golang.org/x/crypto/ssh package
  • Downstream Go projects vendoring the vulnerable ssh subpackage

Discovery Timeline

  • 2025-11-19 - CVE-2025-58181 published to the National Vulnerability Database (NVD)
  • 2025-12-11 - Last updated in NVD database

Technical Details for CVE-2025-58181

Vulnerability Analysis

The golang.org/x/crypto/ssh server implementation processes SSH user authentication requests defined in RFC 4252. When a client selects the gssapi-with-mic authentication method, the SSH protocol requires the client to send a count field followed by a list of supported GSSAPI Object Identifiers (OIDs). The vulnerable server reads this count and pre-allocates a slice sized according to the attacker-supplied value without sanity checking it against any upper bound or against the actual remaining bytes in the request packet.

Because the count is an attacker-controlled 32-bit integer, a malicious client can declare an extremely large number of mechanisms. The server then attempts to allocate a correspondingly large data structure before parsing the actual OID payload. Repeated or parallel requests amplify memory pressure on the host, causing process termination or system-level resource exhaustion.

The vulnerability requires no authentication. The attack can be issued before any credentials are validated, since GSSAPI mechanism negotiation occurs during the authentication exchange itself.

Root Cause

The root cause is missing input validation on a length-prefixed list during SSH authentication packet parsing. The server trusts the wire-format count instead of bounding the allocation to the size of the remaining packet buffer. This pattern matches [CWE-770], Allocation of Resources Without Limits or Throttling.

Attack Vector

An unauthenticated remote attacker establishes a TCP connection to an SSH server using the vulnerable Go package. The attacker completes the SSH transport-layer handshake and then issues a SSH_MSG_USERAUTH_REQUEST with the method name gssapi-with-mic and a forged mechanism count. The server allocates memory proportional to the declared count, exhausting heap memory and degrading or terminating the service.

The vulnerability is described in prose only; no public proof-of-concept code is available. See the Go.dev Vulnerability Advisory and the Go.dev Change Log Entry for the upstream fix details.

Detection Methods for CVE-2025-58181

Indicators of Compromise

  • Abnormal memory growth in processes that embed golang.org/x/crypto/ssh as a server, particularly during the pre-authentication phase.
  • SSH server crashes or out-of-memory (OOM) kills logged by the operating system shortly after inbound TCP connections to port 22.
  • Repeated short-lived SSH sessions from a single source that disconnect immediately after the authentication banner exchange.

Detection Strategies

  • Inventory all Go binaries that import golang.org/x/crypto/ssh using govulncheck or software composition analysis (SCA) tooling to surface vulnerable builds.
  • Inspect SSH server logs for repeated gssapi-with-mic authentication attempts from unauthenticated peers, especially when GSSAPI is not in production use.
  • Correlate SSH process resource consumption against connection counts to identify allocation anomalies during authentication.

Monitoring Recommendations

  • Enable verbose SSH authentication logging and forward events to a centralized analytics platform for baseline comparison.
  • Track per-process resident set size (RSS) and heap growth metrics for SSH server workloads.
  • Alert on kernel oom-killer events targeting SSH daemons or Go-based network services exposing port 22.

How to Mitigate CVE-2025-58181

Immediate Actions Required

  • Upgrade golang.org/x/crypto to a version that contains the fix from change go.dev/cl/721961 and rebuild all affected Go binaries.
  • Restart any SSH services that embed the vulnerable package after rebuilding with the patched dependency.
  • Restrict inbound SSH exposure to trusted source networks using firewall or security group rules until patching completes.

Patch Information

The Go security team published the fix referenced by GO-2025-4134 in the upstream golang.org/x/crypto repository. Update the module using go get golang.org/x/crypto@latest and confirm the resolved version in go.sum includes the patched commit. Validate the build with govulncheck ./... to ensure no remaining references to vulnerable versions. Consult the Go.dev Vulnerability Advisory for the authoritative fixed version range.

Workarounds

  • Disable GSSAPI authentication in the SSH server configuration if the embedding application exposes such a toggle.
  • Place affected SSH services behind a reverse proxy or bastion that terminates and inspects authentication requests.
  • Apply per-source connection rate limits and concurrent connection caps at the network layer to reduce amplification potential.
bash
# Update the vulnerable module and verify with govulncheck
go get golang.org/x/crypto@latest
go mod tidy
govulncheck ./...

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

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechGolang Crypto

  • SeverityMEDIUM

  • CVSS Score5.3

  • EPSS Probability0.05%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-770
  • Technical References
  • Go.dev Issue Tracker Note

  • GoLang Announcement Group Post
  • Vendor Resources
  • Go.dev Change Log Entry

  • Go.dev Vulnerability Advisory
  • Latest CVEs
  • CVE-2026-9813: FlowIntel SSRF Vulnerability

  • CVE-2026-4377: D-Link DWR-X1820 Auth Bypass Vulnerability

  • CVE-2026-47074: ex_aws_sns Auth Bypass Vulnerability

  • CVE-2026-46241: Linux Kernel Use-After-Free Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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