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-2025-0913

CVE-2025-0913: Golang Go Symlink Handling Vulnerability

CVE-2025-0913 is a symlink handling flaw in Golang Go where os.OpenFile behaved inconsistently between Unix and Windows systems. This post covers the technical details, affected versions, security impact, and mitigation.

Updated: January 22, 2026

CVE-2025-0913 Overview

CVE-2025-0913 is a Symlink Attack vulnerability in the Go programming language's standard library affecting Windows systems. The os.OpenFile() function exhibited inconsistent behavior between Unix and Windows platforms when handling dangling symlinks with the O_CREATE|O_EXCL flags. On Unix systems, OpenFile with O_CREATE and O_EXCL flags never follows symlinks, providing secure behavior. However, on Windows, when the target path was a symlink pointing to a nonexistent location, OpenFile would create a file at that symlink destination, enabling potential symlink attacks.

Critical Impact

Applications using Go's os.OpenFile() with O_CREATE|O_EXCL flags on Windows could be tricked into creating files at unintended locations through symlink manipulation, potentially leading to arbitrary file write vulnerabilities.

Affected Products

  • Golang Go (versions before the security patch)
  • Microsoft Windows (as the affected operating system platform)
  • Go applications deployed on Windows using os.OpenFile() with O_CREATE|O_EXCL flags

Discovery Timeline

  • 2025-06-11 - CVE-2025-0913 published to NVD
  • 2025-08-08 - Last updated in NVD database

Technical Details for CVE-2025-0913

Vulnerability Analysis

The vulnerability stems from a cross-platform behavioral inconsistency in Go's os.OpenFile() function when processing file creation with exclusive access flags. On Unix-like systems, the combination of O_CREATE (create file if it doesn't exist) and O_EXCL (fail if file exists) flags ensures that symlinks are never followed, providing an implicit protection against symlink-based attacks.

However, the Windows implementation did not maintain this same security guarantee. When a local attacker created a symlink pointing to a nonexistent path and a Go application attempted to create a file using the symlink as the target with O_CREATE|O_EXCL flags, Windows would follow the symlink and create the file at the symlink's destination rather than failing or creating the file at the symlink path itself.

This platform-specific behavior could be exploited to write files to arbitrary locations where the attacker has permission to create symlinks but not to directly write files, effectively bypassing file system access controls.

Root Cause

The root cause is the platform-dependent handling of symlinks in Go's file system abstraction layer for the os.OpenFile() function. The Unix implementation correctly refuses to follow symlinks when O_EXCL is specified, treating the symlink itself as the target. The Windows implementation lacked this symlink resolution check, causing it to dereference dangling symlinks before creating the file, leading to file creation at unintended locations.

Attack Vector

The attack vector requires local access to the system. An attacker must be able to create a symlink at a location where a vulnerable Go application will subsequently call os.OpenFile() with O_CREATE|O_EXCL flags. The attacker creates a symlink pointing to a target directory where they want the file to be written. When the Go application executes the file creation operation, it inadvertently creates the file at the symlink's destination rather than at the intended path.

This type of symlink attack (CWE-59) typically enables privilege escalation scenarios, configuration file tampering, or overwriting sensitive system files if the Go application runs with elevated privileges.

Detection Methods for CVE-2025-0913

Indicators of Compromise

  • Unexpected symlinks appearing in directories where Go applications create files
  • Files being created in unexpected locations by Go applications
  • Suspicious symlink creation activity by non-privileged users targeting directories used by privileged Go services
  • File system audit logs showing file creation events where the path differs from the application's intended target

Detection Strategies

  • Audit Go application source code for usage of os.OpenFile() with O_CREATE|O_EXCL flag combinations on Windows deployments
  • Monitor file system events for symlink creation followed by file write operations from Go binaries
  • Implement file integrity monitoring on critical directories that may be targeted by symlink attacks
  • Use static analysis tools to identify vulnerable code patterns in Go applications

Monitoring Recommendations

  • Enable Windows file system auditing to track symlink creation events
  • Configure application-level logging to record file creation paths and verify they match expected locations
  • Implement endpoint detection rules for suspicious symlink activity patterns
  • Review Go application logs for file operation failures that may indicate exploitation attempts

How to Mitigate CVE-2025-0913

Immediate Actions Required

  • Update Go installations to the latest patched version that addresses this vulnerability
  • Audit existing Go applications for use of os.OpenFile() with O_CREATE|O_EXCL flags on Windows
  • Recompile and redeploy affected Go applications using the patched Go toolchain
  • Restrict symlink creation permissions where possible on Windows systems hosting vulnerable applications

Patch Information

The Go team has released a fix that ensures os.OpenFile() now consistently returns an error when both O_CREATE and O_EXCL flags are set and the target path is a symlink, regardless of platform. Technical details of the fix are available in the Go.dev Change Log Entry. The vulnerability is tracked in the Go.dev Issue Discussion, and the official vulnerability report is documented as GO-2025-3750.

Workarounds

  • Validate file paths before calling os.OpenFile() by checking if the path is a symlink using os.Lstat() and rejecting symlinks
  • Implement application-level symlink detection before file creation operations
  • Run Go applications with minimal necessary privileges to limit the impact of potential symlink attacks
  • Use directory permissions to prevent untrusted users from creating symlinks in paths used by Go applications
bash
# Check Go version and update to patched release
go version
# Update Go to the latest version containing the fix
# Rebuild affected applications
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 Score5.5

  • EPSS Probability0.01%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-59
  • Technical References
  • Go.dev Change Log Entry

  • Go.dev Issue Discussion

  • Golang Announce Google Group Post
  • Vendor Resources
  • Go.dev Vulnerability Report GO-2025-3750
  • Related CVEs
  • CVE-2022-23806: Golang Go Elliptic Curve Vulnerability

  • CVE-2021-34558: Golang Go TLS Certificate 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