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-2024-1394

CVE-2024-1394: Golang RSA Memory Leak DoS Vulnerability

CVE-2024-1394 is a memory leak denial-of-service vulnerability in Golang's RSA encryption code that enables resource exhaustion attacks. This article covers the technical details, affected versions, impact, and mitigation.

Updated: January 22, 2026

CVE-2024-1394 Overview

A memory leak vulnerability was discovered in the Golang FIPS OpenSSL RSA encrypting/decrypting code that can lead to resource exhaustion when processing attacker-controlled inputs. The flaw exists in github.com/golang-fips/openssl/openssl/rsa.go#L113 where pkey and ctx objects are leaked due to improper handling of named return parameters in error cases. When errors occur during context initialization or property setting, the function returns nil values that prevent the deferred cleanup function from properly freeing the allocated resources.

Critical Impact

This vulnerability enables attackers to exhaust system memory resources through repeated RSA encryption/decryption operations, potentially causing denial of service conditions in applications using the affected Golang FIPS OpenSSL library.

Affected Products

  • github.com/golang-fips/openssl (prior to patched versions)
  • github.com/microsoft/go-crypto-openssl (prior to patched versions)
  • Red Hat Enterprise Linux products using affected Go toolsets

Discovery Timeline

  • 2024-03-21 - CVE-2024-1394 published to NVD
  • 2025-05-13 - Last updated in NVD database

Technical Details for CVE-2024-1394

Vulnerability Analysis

The vulnerability is classified as CWE-401 (Missing Release of Memory after Effective Lifetime), a common memory management flaw that occurs when allocated memory is not properly freed. In this case, the affected function uses Go's named return parameters pattern to handle resource cleanup via deferred functions. However, when error conditions are encountered during RSA key context initialization, the code follows a return nil, nil, fail(...) pattern that sets both pkey and ctx to nil before the deferred cleanup function executes. Since the deferred function checks for non-nil values before freeing resources, the memory allocated for these objects is never released.

This type of memory leak is particularly dangerous in cryptographic code because RSA operations are often performed repeatedly at scale—during TLS handshakes, API authentication, or data encryption workflows. An attacker can exploit this by submitting malformed or specially crafted inputs that trigger the error paths, causing memory to accumulate with each failed operation until the system runs out of available resources.

Root Cause

The root cause lies in the misuse of Go's named return parameters combined with deferred cleanup functions. The original code declared ctx as a named return parameter in the function signature (func newCipherCtx(...) (ctx C.GO_EVP_CIPHER_CTX_PTR, err error)). When an error occurred, the code would return nil for the context, which overwrote the named parameter. The deferred cleanup function then saw a nil value and skipped the memory deallocation. The same pattern affected the setupEVP function where ctx was declared as a named return but could be set to a non-nil value before an error occurred on a different code path.

Attack Vector

An attacker can exploit this vulnerability remotely by sending specially crafted RSA encryption or decryption requests to applications using the vulnerable library. The attack requires no authentication or user interaction. By repeatedly triggering error conditions in the RSA processing code—through malformed keys, invalid padding, or other cryptographic parameter errors—an attacker can force the application to allocate memory that is never freed. Over time, this memory exhaustion leads to denial of service as the application consumes all available system memory and either crashes or becomes unresponsive.

go
// Security patch in cipher.go - Changed named return to anonymous return
// Source: https://github.com/golang-fips/openssl/commit/85d31d0d257ce842c8a1e63c4d230ae850348136

// BEFORE (vulnerable):
func newCipherCtx(kind cipherKind, mode cipherMode, encrypt cipherOp, key, iv []byte) (ctx C.GO_EVP_CIPHER_CTX_PTR, err error) {
	// ctx was a named return parameter that could be overwritten

// AFTER (patched):
func newCipherCtx(kind cipherKind, mode cipherMode, encrypt cipherOp, key, iv []byte) (_ C.GO_EVP_CIPHER_CTX_PTR, err error) {
	ctx := C.go_openssl_EVP_CIPHER_CTX_new()
	if ctx == nil {
		return nil, fail("unable to create EVP cipher ctx")
	}
	// ctx is now a local variable, properly scoped for deferred cleanup
go
// Security patch in evp.go - Fixed memory leak in setupEVP
// Source: https://github.com/microsoft/go-crypto-openssl/commit/104fe7f6912788d2ad44602f77a0a0a62f1f259f

func setupEVP(withKey withKeyFunc, padding C.int,
	h, mgfHash hash.Hash, label []byte, saltLen C.int, ch crypto.Hash,
	init initFunc) (_ C.GO_EVP_PKEY_CTX_PTR, err error) {
	var ctx C.GO_EVP_PKEY_CTX_PTR
	withKey(func(pkey C.GO_EVP_PKEY_PTR) C.int {
		ctx = C.go_openssl_EVP_PKEY_CTX_new(pkey, nil)
		return 1
	})
	if ctx == nil {
		return nil, newOpenSSLError("EVP_PKEY_CTX_new failed")
	}
	defer func() {
		if err != nil {
			if ctx != nil {
				// Now ctx is properly available for cleanup
			}
		}
	}()

Detection Methods for CVE-2024-1394

Indicators of Compromise

  • Unusual memory growth in Go applications performing RSA operations
  • Gradual increase in process memory consumption without corresponding workload increase
  • Application crashes or OOM (Out of Memory) killer events in system logs
  • High volume of failed RSA encryption/decryption operations in application logs

Detection Strategies

  • Monitor memory utilization trends for Go applications using FIPS-compliant cryptographic libraries
  • Implement application-level memory profiling using Go's runtime/pprof to identify memory leaks
  • Track RSA operation error rates and correlate with memory consumption patterns
  • Use container memory limits to detect and alert on abnormal memory growth before system-wide impact

Monitoring Recommendations

  • Configure alerts for processes exceeding expected memory thresholds
  • Implement regular memory profiling in staging environments with production-like workloads
  • Review application logs for patterns of repeated cryptographic operation failures
  • Monitor Go runtime metrics including heap allocation and garbage collection statistics

How to Mitigate CVE-2024-1394

Immediate Actions Required

  • Update github.com/golang-fips/openssl to the patched version containing commit 85d31d0d257ce842c8a1e63c4d230ae850348136
  • Update github.com/microsoft/go-crypto-openssl to the patched version containing commit 104fe7f6912788d2ad44602f77a0a0a62f1f259f
  • Apply relevant Red Hat security advisories for affected enterprise products
  • Rebuild Go applications that depend on the vulnerable library versions

Patch Information

The vulnerability has been addressed through patches in both the golang-fips/openssl and microsoft/go-crypto-openssl repositories. The fix changes named return parameters to anonymous returns (using _), ensuring that local variables are properly scoped for deferred cleanup functions. Red Hat has released multiple security advisories addressing this vulnerability across their product portfolio, including RHSA-2024:1462, RHSA-2024:1468, and numerous others. Full details are available in the GitHub Security Advisory GHSA-78hx-gp6g-7mj6 and Go Vulnerability Advisory GO-2024-2660.

Workarounds

  • Implement application-level memory limits and automatic restart mechanisms to reduce impact of memory exhaustion
  • Deploy rate limiting on endpoints that trigger RSA operations to slow potential exploitation
  • Consider switching to non-FIPS Go crypto implementations temporarily if FIPS compliance is not strictly required
  • Monitor and alert on memory consumption to enable early detection and manual intervention
bash
# Verify your Go module dependencies for vulnerable versions
go list -m all | grep -E "golang-fips/openssl|go-crypto-openssl"

# Update to patched versions
go get github.com/golang-fips/openssl@latest
go get github.com/microsoft/go-crypto-openssl@latest

# Rebuild your application
go build -o myapp ./...

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

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechGolang

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability1.02%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-401
  • Technical References
  • Red Hat Security Advisory RHSA-2024:1462

  • Red Hat Security Advisory RHSA-2024:1468

  • Red Hat Security Advisory RHSA-2024:1472

  • Red Hat Security Advisory RHSA-2024:1501

  • Red Hat Security Advisory RHSA-2024:1502

  • Red Hat Security Advisory RHSA-2024:1561

  • Red Hat Security Advisory RHSA-2024:1563

  • Red Hat Security Advisory RHSA-2024:1566

  • Red Hat Security Advisory RHSA-2024:1567

  • Red Hat Security Advisory RHSA-2024:1574

  • Red Hat Security Advisory RHSA-2024:1640

  • Red Hat Security Advisory RHSA-2024:1644

  • Red Hat Security Advisory RHSA-2024:1646

  • Red Hat Security Advisory RHSA-2024:1763

  • Red Hat Security Advisory RHSA-2024:1897

  • Red Hat Security Advisory RHSA-2024:2562

  • Red Hat Security Advisory RHSA-2024:2568

  • Red Hat Security Advisory RHSA-2024:2569

  • Red Hat Security Advisory RHSA-2024:2729

  • Red Hat Security Advisory RHSA-2024:2730

  • Red Hat Security Advisory RHSA-2024:2767

  • Red Hat Security Advisory RHSA-2024:3265

  • Red Hat Security Advisory RHSA-2024:3352

  • Red Hat Security Advisory RHSA-2024:4146

  • Red Hat Security Advisory RHSA-2024:4371

  • Red Hat Security Advisory RHSA-2024:4378

  • Red Hat Security Advisory RHSA-2024:4379

  • Red Hat Security Advisory RHSA-2024:4502

  • Red Hat Security Advisory RHSA-2024:4581

  • Red Hat Security Advisory RHSA-2024:4591

  • Red Hat Security Advisory RHSA-2024:4672

  • Red Hat Security Advisory RHSA-2024:4699

  • Red Hat Security Advisory RHSA-2024:4761

  • Red Hat Security Advisory RHSA-2024:4762

  • Red Hat Security Advisory RHSA-2024:4960

  • Red Hat Security Advisory RHSA-2024:5258

  • Red Hat Security Advisory RHSA-2024:5634

  • Red Hat Security Advisory RHSA-2024:7262

  • Red Hat Security Advisory RHSA-2025:7118

  • Red Hat CVE-2024-1394 Reference

  • Red Hat Bugzilla Entry 2262921

  • GitHub Commit for OpenSSL

  • GitHub Security Advisory GHSA-78hx-gp6g-7mj6

  • GitHub Commit for Go Crypto

  • Go Vulnerability Advisory GO-2024-2660

  • Go Vulnerability Detail GO-2024-2660
  • Related CVEs
  • CVE-2025-47911: Go html.Parse DoS Vulnerability

  • CVE-2025-58190: Golang x/net/html DoS Vulnerability

  • CVE-2025-58187: Golang Go DOS Vulnerability

  • CVE-2025-58188: Golang Go 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