Apache Tomcat Directory Listing Enabled Vulnerability

漏洞信息

漏洞名称: Apache Tomcat Directory Listing Enabled Vulnerability

漏洞类型: 配置问题

漏洞等级: 中危

漏洞描述: Apache Tomcat是一个广泛使用的开源Web服务器和Servlet容器,支持Java Servlet和JavaServer Pages (JSP)技术,常用于企业级应用部署。由于其高性能和稳定性,Tomcat在互联网服务中占有重要地位。

该漏洞属于配置问题,具体表现为Tomcat服务器启用了目录列表功能。当目录列表功能开启时,攻击者可以通过简单的HTTP请求浏览Web目录中的文件列表,无需任何认证。这种配置不当可能导致敏感文件(如配置文件、源代码、用户数据等)被未授权访问,进而引发信息泄露风险。

从技术角度看,此漏洞的根源在于DefaultServlet的listings参数被设置为true,允许服务器在没有默认索引文件(如index.html)的情况下返回目录内容列表。虽然这本身不是代码缺陷,但不当的配置会显著增加安全风险。攻击者可以利用此漏洞轻松发现和下载敏感文件,为进一步的攻击(如利用文件中的硬编码凭证或API密钥)创造条件。由于无需认证即可利用,此类漏洞尤其危险,特别是在面向互联网的服务中。

产品厂商: apache

产品名称: tomcat

搜索语法: title:”Apache Tomcat”

来源: https://github.com/projectdiscovery/nuclei-templates/blob/e8e5d5f75b90b07e4a15961280a97cfbfaeff41a/http%2Fmisconfiguration%2Ftomcat-directory-listing.yaml

类型: projectdiscovery/nuclei-templates:github issues

POC详情

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44

id: tomcat-directory-listing

info:
name: Apache Tomcat - Directory Listing Enabled
author: oleveloper
severity: medium
description: |
Directory listing is enabled on the Apache Tomcat server, allowing users to view the contents of web directories.This could lead to unauthorized access to sensitive files and potential information disclosure.
remediation: |
Disable directory listings by setting the listings parameter to false in the web.xml under the DefaultServlet. This helps prevent unauthorized directory browsing and protects sensitive files.
reference:
- https://isms.kisa.or.kr
metadata:
verified: true
max-request: 1
vendor: apache
product: tomcat
shodan-query: title:"Apache Tomcat"
tags: tomcat,misconfig,listing,kisa

http:
- method: GET
path:
- "{{BaseURL}}"

matchers-condition: and
matchers:
- type: word
part: body
words:
- "Directory Listing For"
- "<a href="

- type: regex
part: header
regex:
- "(?i)content-type:.*text/html"

- type: status
status:
- 200



Apache Tomcat Directory Listing Enabled Vulnerability
http://example.com/2025/08/04/github_725149040/
作者
lianccc
发布于
2025年8月4日
许可协议