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
    • 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-47909

CVE-2025-47909: Go TrustedOrigins CSRF Vulnerability

CVE-2025-47909 is a CSRF vulnerability in Go's TrustedOrigins that allows network attackers to bypass origin checks by exploiting HTTP/HTTPS schema handling. This article covers technical details, attack scenarios, and mitigation.

Updated: May 19, 2026

CVE-2025-47909 Overview

CVE-2025-47909 is a Cross-Site Request Forgery (CSRF) protection bypass in the github.com/gorilla/csrf Go module. Hosts added to the TrustedOrigins allowlist implicitly accept requests from both their HTTPS and HTTP origins. A network attacker positioned between the client and an HTTP endpoint can leverage this to forge state-changing requests against an HTTPS application. The flaw is classified under CWE-346: Origin Validation Error.

Critical Impact

A network-positioned man-in-the-middle (MitM) attacker can perform CSRF attacks against applications using gorilla/csrf whenever a trusted origin host is reachable over plain HTTP.

Affected Products

  • github.com/gorilla/csrf Go module (all versions that ship the post-CVE-2025-24358 origin check)
  • Go web applications relying on TrustedOrigins for cross-origin allowlisting
  • Applications that have not migrated to net/http.CrossOriginProtection (introduced in Go 1.25)

Discovery Timeline

  • 2025-08-29 - CVE-2025-47909 published to NVD
  • 2026-04-15 - Last updated in NVD database

Technical Details for CVE-2025-47909

Vulnerability Analysis

The defect lives in the origin validation logic that gorilla/csrf introduced to remediate CVE-2025-24358. That earlier fix compares the inbound Origin header against a synthetic URL built from the request host using sameOrigin. The comparison ignores the scheme component of the synthetic URL and matches only on host.

When an application calls TrustedOrigins with a host such as example.net, the library accepts requests originating from either https://example.net or http://example.net. This makes the allowlist scheme-agnostic in a way that is invisible to developers reading the configuration. The flaw weakens transport security guarantees by re-introducing a CSRF vector that the original patch was intended to close.

Root Cause

The root cause is improper origin validation. The library treats Origin headers as equivalent whenever their host matches a trusted entry, regardless of whether the request arrived over http:// or https://. Because HTTP origins are subject to network tampering, an attacker controlling traffic on the path to a trusted host can inject content that issues authenticated cross-origin requests to the protected HTTPS application.

Attack Vector

Consider an application hosted at https://example.com that adds example.net to its TrustedOrigins. A network attacker who can intercept plaintext traffic to example.net serves a malicious HTML page at http://example.net containing an auto-submitting form targeting https://example.com. The browser attaches the user's session cookies, the Origin header reads http://example.net, and gorilla/csrf accepts the request because the host matches the trusted entry. The attacker does not need to compromise the protected application or its TLS certificate — only an unrelated HTTP-reachable trusted host.

No public proof-of-concept is referenced in the Go vulnerability database entry at the time of writing.

Detection Methods for CVE-2025-47909

Indicators of Compromise

  • Inbound state-changing requests carrying an Origin header with scheme http:// whose host matches an entry in TrustedOrigins.
  • Unexpected POST, PUT, PATCH, or DELETE requests with Referer headers pointing at HTTP versions of trusted partner domains.
  • Application logs showing successful CSRF token validation for requests that originated from non-TLS contexts.

Detection Strategies

  • Audit application source for calls to csrf.TrustedOrigins and enumerate every host that is allowlisted.
  • Instrument middleware to log the full Origin and Referer headers on authenticated mutating requests, then alert on HTTP-scheme matches.
  • Run dependency scanners against go.mod to identify projects pinned to vulnerable github.com/gorilla/csrf releases as flagged by GO-2025-3884.

Monitoring Recommendations

  • Forward web server access logs to a centralized analytics pipeline and build queries that correlate Origin: http:// headers with sensitive endpoints.
  • Alert when a trusted-origin host begins serving content over HTTP, which expands the MitM attack surface.
  • Track govulncheck results in CI to catch new builds that still depend on vulnerable module versions.

How to Mitigate CVE-2025-47909

Immediate Actions Required

  • Inventory every Go service that imports github.com/gorilla/csrf and review its TrustedOrigins configuration.
  • Migrate to net/http.CrossOriginProtection in Go 1.25, which performs scheme-aware origin checks by default.
  • If migration to Go 1.25 is not feasible, switch to the maintained backport at filippo.io/csrf, or use the drop-in filippo.io/csrf/gorilla replacement for the existing API surface.

Patch Information

The upstream remediation guidance, published with the Go vulnerability report GO-2025-3884 and tracked in golang/vulndb issue #3884, is to stop relying on gorilla/csrf origin validation. Applications should adopt net/http.CrossOriginProtection, filippo.io/csrf, or filippo.io/csrf/gorilla. These replacements treat the request scheme as part of the origin and reject HTTP-origin submissions to HTTPS applications.

Workarounds

  • Remove entries from TrustedOrigins whose hosts are reachable over plain HTTP, or restrict the allowlist to first-party hosts that enforce HSTS preload.
  • Terminate the request at a reverse proxy that strips or rewrites Origin headers to enforce HTTPS-only cross-origin policy.
  • Require SameSite=Strict or SameSite=Lax cookies on session identifiers to reduce browser-initiated cross-origin exposure.
bash
# Replace vulnerable gorilla/csrf usage with the maintained backport
go get filippo.io/csrf@latest
go mod tidy

# Verify remediation with govulncheck
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./...

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

  • Vulnerability Details
  • TypeCSRF

  • Vendor/TechGo

  • SeverityHIGH

  • CVSS Score7.3

  • EPSS Probability0.05%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-346
  • Technical References
  • GitHub Issue #3884

  • Go.dev Vulnerability Report
  • Related CVEs
  • CVE-2026-33252: Go MCP SDK CSRF Vulnerability

  • CVE-2024-45258: Go req Package Unintended Request Flaw

  • CVE-2025-22867: Go CGO Build RCE Vulnerability on Darwin

  • CVE-2026-27896: Go MCP SDK Auth Bypass 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