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-2021-47901

CVE-2021-47901: Dirsearch CSV Injection Vulnerability

CVE-2021-47901 is a CSV injection flaw in Dirsearch 0.4.1 that enables formula injection via the --csv-report flag. Attackers exploit malicious redirects to inject Excel formulas. This article covers technical details, affected versions, impact, and mitigation strategies.

Published: January 30, 2026

CVE-2021-47901 Overview

CVE-2021-47901 is a CSV Injection vulnerability affecting Dirsearch version 0.4.1, a popular web path scanner used by security professionals. The vulnerability exists in the CSV report generation functionality, specifically when users employ the --csv-report flag. Attackers can exploit this flaw by crafting malicious server redirects containing comma-separated paths with embedded Excel formulas, which are then written directly to the generated CSV report without proper sanitization.

Critical Impact

Attackers can inject malicious formulas into CSV reports generated by Dirsearch, potentially leading to arbitrary code execution when the report is opened in spreadsheet applications like Microsoft Excel or LibreOffice Calc.

Affected Products

  • Dirsearch 0.4.1

Discovery Timeline

  • 2026-01-27 - CVE CVE-2021-47901 published to NVD
  • 2026-01-29 - Last updated in NVD database

Technical Details for CVE-2021-47901

Vulnerability Analysis

This CSV Injection vulnerability (classified as CWE-1236) occurs due to improper neutralization of formula elements in the CSV export functionality of Dirsearch. When Dirsearch scans a target web application and encounters HTTP redirects, it records the redirect URLs in its output. If an attacker controls the web server being scanned, they can configure malicious redirects containing specially crafted paths with embedded spreadsheet formulas.

The attack exploits how spreadsheet applications interpret certain characters at the beginning of cell values. Characters such as =, +, -, and @ are treated as formula prefixes by applications like Microsoft Excel. When a security analyst opens the generated CSV report, the malicious formulas execute automatically, potentially leading to data exfiltration, system compromise, or other malicious activities.

Root Cause

The root cause of this vulnerability is the lack of input sanitization when writing data to CSV files. Dirsearch's CSV report generation functionality does not escape or prefix potentially dangerous characters that could be interpreted as formula syntax by spreadsheet applications. This allows user-controlled data (in this case, redirect URLs from scanned servers) to be written directly to the output file without proper encoding.

Attack Vector

The attack vector is network-based and requires user interaction. An attacker must first set up a malicious web server with crafted redirect responses. When a victim uses Dirsearch to scan this server with the --csv-report flag enabled, the malicious payloads are recorded in the CSV output. The attack completes when the victim opens the generated CSV file in a spreadsheet application that interprets and executes the embedded formulas.

The exploitation technique involves configuring a web server to return HTTP redirect responses where the Location header contains comma-separated values with Excel formula syntax. For example, a redirect to a path like =cmd|'/C calc.exe'!A0 would be written to the CSV file, and upon opening in Excel, could execute system commands.

Detection Methods for CVE-2021-47901

Indicators of Compromise

  • CSV files generated by Dirsearch containing cells starting with formula characters (=, +, -, @, \t, \r)
  • Unusual redirect URLs in web server logs containing comma-separated values or formula syntax
  • Unexpected process execution immediately after opening CSV files in spreadsheet applications
  • Network connections initiated from spreadsheet applications to external servers

Detection Strategies

  • Monitor file system activity for CSV files created by Dirsearch that contain suspicious formula patterns
  • Implement endpoint detection rules to alert on spreadsheet applications spawning child processes
  • Use YARA rules to scan CSV files for common CSV injection patterns before opening
  • Enable logging on web servers to detect reconnaissance scans with formula payloads in response headers

Monitoring Recommendations

  • Configure SentinelOne to monitor for process chains where Excel or LibreOffice spawn command-line interpreters
  • Implement network monitoring to detect outbound connections from spreadsheet applications to untrusted destinations
  • Enable file integrity monitoring on directories where Dirsearch outputs are typically stored

How to Mitigate CVE-2021-47901

Immediate Actions Required

  • Upgrade Dirsearch to a version newer than 0.4.1 that includes proper CSV sanitization
  • Avoid using the --csv-report flag when scanning untrusted or potentially malicious web servers
  • Open CSV files in text editors first to inspect for suspicious content before opening in spreadsheet applications
  • Configure spreadsheet applications to disable automatic formula execution for imported CSV files

Patch Information

Users should update to the latest version of Dirsearch available from the GitHub Directory Scanner repository. The vulnerability is documented in Exploit-DB #49370 and the VulnCheck Security Advisory.

Workarounds

  • Manually prefix all CSV cell values with a single quote (') before opening in spreadsheet applications
  • Use alternative output formats such as JSON or plain text instead of CSV when available
  • Process CSV output through a sanitization script that escapes formula-triggering characters
  • Open CSV files in Google Sheets (browser-based) which has more restrictive formula execution policies
bash
# Configuration example
# Sanitize Dirsearch CSV output before opening in Excel
# This script prefixes potentially dangerous cells with a single quote

sed -i "s/^=/\'=/g; s/,=/,\'=/g; s/^+/\'+/g; s/,+/,\'+/g; s/^-/\'-/g; s/,-/,\'-/g; s/^@/\'@/g; s/,@/,\'@/g" dirsearch_report.csv

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

  • Vulnerability Details
  • TypeOther

  • Vendor/TechDirsearch

  • SeverityMEDIUM

  • CVSS Score5.1

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N/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
  • AvailabilityNone
  • CWE References
  • CWE-1236
  • Technical References
  • GitHub Directory Scanner

  • Exploit-DB #49370

  • VulnCheck Security Advisory
  • Latest CVEs
  • CVE-2025-70797: LimeSurvey XSS Vulnerability

  • CVE-2025-30650: Juniper Junos OS Auth Bypass Vulnerability

  • CVE-2026-35471: Goshs Path Traversal Vulnerability

  • CVE-2026-35393: Goshs Path Traversal 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