banner logoJoin us at RSAC™ 2026 Conference, March 23–March 26 | North Expo, Booth N-5863Join us at RSAC™ 2026, March 23–March 26Learn More
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI Security Portfolio
      Leading the Way in AI-Powered Security Solutions
    • 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
    • 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-2026-27498

CVE-2026-27498: n8n Workflow Automation RCE Vulnerability

CVE-2026-27498 is a remote code execution vulnerability in n8n workflow automation platform that allows authenticated attackers to execute arbitrary commands. This article covers the technical details, affected versions, and mitigation.

Published: February 27, 2026

CVE-2026-27498 Overview

CVE-2026-27498 is a critical Remote Code Execution (RCE) vulnerability in n8n, an open source workflow automation platform. The vulnerability allows authenticated users with workflow creation or modification permissions to chain the Read/Write Files from Disk node with git operations to achieve arbitrary command execution on the n8n host server. By writing to specific configuration files (particularly within the .git directory) and then triggering a git operation, an attacker can execute arbitrary shell commands.

Critical Impact

Authenticated attackers can achieve full remote code execution on the n8n host by manipulating git configuration files through legitimate workflow features, potentially compromising the entire server and any connected systems.

Affected Products

  • n8n versions prior to 2.2.0
  • n8n versions prior to 1.123.8
  • Any n8n deployment where users have workflow creation/modification permissions

Discovery Timeline

  • February 25, 2026 - CVE-2026-27498 published to NVD
  • February 25, 2026 - Last updated in NVD database

Technical Details for CVE-2026-27498

Vulnerability Analysis

This vulnerability exploits a dangerous combination of two legitimate n8n features: the Read/Write Files from Disk node and git operations. The core issue stems from insufficient access controls on file system operations, specifically allowing writes to sensitive git configuration files. When an attacker writes malicious content to .git/config or .git/hooks/ directories and subsequently triggers a git operation within a workflow, the crafted configuration or hook scripts execute with the privileges of the n8n process.

The vulnerability is classified under CWE-94 (Improper Control of Generation of Code), as it enables code injection through configuration file manipulation. The attack requires authentication and workflow creation privileges, but these are commonly granted to users in collaborative automation environments.

Root Cause

The root cause lies in the lack of file path restrictions in the Read/Write Files from Disk node. Prior to the patch, this node could write to any file accessible by the n8n process, including sensitive configuration directories like .git. Git operations in n8n workflows would then execute hooks or follow configuration directives written by the attacker, resulting in arbitrary command execution.

Attack Vector

The attack vector is network-based and requires an authenticated user with permissions to create or modify workflows. The attack chain consists of:

  1. Creating a workflow that uses the Read/Write Files from Disk node to write malicious content to a .git configuration file or hook script
  2. Triggering a git operation (such as a clone, fetch, or commit) within the same or a subsequent workflow
  3. The git operation executes the attacker-controlled commands with the privileges of the n8n process

The patch introduces regex-based file pattern blocking to prevent access to .git directories:

typescript
// Security patch adding blocked file pattern configuration
// Source: https://github.com/n8n-io/n8n/commit/97365caf253978ba8e46d7bc53fa7ac3b6f67b32

	@Env('N8N_BLOCK_FILE_ACCESS_TO_N8N_FILES')
	blockFileAccessToN8nFiles: boolean = true;

	/**
	 * Blocked file and folder regular expression patterns that `ReadWriteFile` and `ReadBinaryFiles` nodes cant access. Separate multiple patterns with with semicolon `;`.
	 * - `^(.*\/)*\.git(\/.*)*$`
	 * Set to empty to not block based on file patterns.
	 */
	@Env('N8N_BLOCK_FILE_PATTERNS')
	blockFilePatterns: string = '^(.*\\/)*\\.git(\\/.*)*$';

	/**
	 * In a [security audit](https://docs.n8n.io/hosting/securing/security-audit/), how many days for a workflow to be considered abandoned if not executed.
	 */

The file system helper functions were also updated to enforce these pattern restrictions:

typescript
// Implementation of file pattern blocking logic
// Source: https://github.com/n8n-io/n8n/commit/e22acaab3dcb2004e5fe0bf9ef2db975bde61866

function isFilePatternBlocked(resolvedFilePath: ResolvedFilePath): boolean {
	const { blockFilePatterns } = Container.get(SecurityConfig);

	return blockFilePatterns
		.split(';')
		.map((pattern) => pattern.trim())
		.filter((pattern) => pattern)
		.some((pattern) => {
			try {
				return new RegExp(pattern, 'mi').test(resolvedFilePath);
			} catch {
				return true;
			}
		});
}

function isFilePathBlocked(resolvedFilePath: ResolvedFilePath): boolean {
	const allowedPaths = getAllowedPaths();
	const blockFileAccessToN8nFiles = process.env[BLOCK_FILE_ACCESS_TO_N8N_FILES] !== 'false';

Detection Methods for CVE-2026-27498

Indicators of Compromise

  • Unexpected modifications to .git/config files on the n8n host system
  • Creation or modification of files within .git/hooks/ directories
  • Workflow executions that include both file write operations and git operations in sequence
  • Unusual process spawning from the n8n server process, particularly shell commands

Detection Strategies

  • Monitor workflow logs for Read/Write Files from Disk node operations targeting paths containing .git
  • Implement file integrity monitoring on git repositories accessible by the n8n process
  • Audit workflow configurations for combinations of file write nodes followed by git operations
  • Review n8n audit logs for users creating or modifying workflows with file system access nodes

Monitoring Recommendations

  • Enable comprehensive logging for all file system operations performed by n8n workflows
  • Configure alerts for any git hook execution or configuration changes on the n8n host
  • Monitor process creation events from the n8n process for unexpected command execution
  • Implement network monitoring for unusual outbound connections from the n8n server following workflow executions

How to Mitigate CVE-2026-27498

Immediate Actions Required

  • Upgrade n8n to version 2.2.0 or 1.123.8 immediately
  • Review all existing workflows for suspicious file write operations, especially targeting .git paths
  • Audit user permissions and revoke workflow creation/modification access from untrusted users
  • Check system logs for any evidence of past exploitation attempts

Patch Information

n8n has released security patches in versions 2.2.0 and 1.123.8. The patches introduce a new configuration option N8N_BLOCK_FILE_PATTERNS that defaults to blocking access to .git directories via a regex pattern. The fix adds the isFilePatternBlocked() function to validate file paths before allowing read/write operations.

Patch details are available in the following resources:

  • n8n Release 2.2.0
  • n8n Release 1.123.8
  • GitHub Security Advisory GHSA-x2mw-7j39-93xq

Workarounds

  • Limit workflow creation and editing permissions to fully trusted users only
  • Disable the Read/Write Files from Disk node by adding n8n-nodes-base.readWriteFile to the NODES_EXCLUDE environment variable
  • Implement network segmentation to limit the impact of potential compromise
  • Run n8n with minimal file system permissions and in a containerized environment
bash
# Temporary mitigation: Disable the Read/Write Files from Disk node
export NODES_EXCLUDE="n8n-nodes-base.readWriteFile"

# Additional hardening: Set custom file pattern restrictions (post-patch)
export N8N_BLOCK_FILE_PATTERNS="^(.*\/)*\.git(\/.*)*$;^(.*\/)*\.ssh(\/.*)*$"

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechN8n

  • SeverityCRITICAL

  • CVSS Score9.0

  • EPSS Probability0.59%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-94
  • Technical References
  • GitHub Commit Changes

  • GitHub Commit Changes

  • GitHub Release n8n@1.123.8

  • GitHub Release n8n@2.2.0

  • GitHub Security Advisory GHSA-x2mw-7j39-93xq
  • Related CVEs
  • CVE-2026-27577: n8n Workflow Automation RCE Vulnerability

  • CVE-2026-27495: n8n Workflow Automation RCE Vulnerability

  • CVE-2026-27494: n8n Workflow Automation RCE Vulnerability

  • CVE-2026-27493: n8n Workflow Automation 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
  • English
  • 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