Apache Tomcat Directory Listing Enabled Vulnerability

漏洞信息

漏洞名称: Apache Tomcat Directory Listing Enabled Vulnerability

漏洞类型: 信息泄露

漏洞等级: 中危

漏洞描述: Apache Tomcat是一款广泛使用的开源Web服务器和Servlet容器,支持Java Servlet和JSP技术,常用于企业级Web应用的部署。由于其高性能和稳定性,Tomcat在全球范围内被众多企业和开发者所采用。本次发现的漏洞涉及Tomcat服务器的目录列表功能被启用,这可能导致未经授权的用户浏览服务器上的目录结构,进而访问敏感文件,造成信息泄露。漏洞的技术根源在于Tomcat的配置问题,即未正确设置DefaultServlet或web.xml文件中的属性为false,从而允许目录浏览。这种配置不当可能被攻击者利用,通过简单的HTTP请求即可查看服务器上的文件和目录列表,无需任何认证。虽然该漏洞本身不直接允许代码执行或系统控制,但泄露的敏感信息可能被用于进一步的攻击,如利用其他漏洞或进行社会工程学攻击。因此,建议管理员立即检查并禁用目录列表功能,以降低潜在的安全风险。

产品厂商: Apache

产品名称: Apache Tomcat

来源: https://github.com/projectdiscovery/nuclei-templates/blob/456ab289f198fd4d481c3de81413d99dcc2a0dbe/file%2Faudit%2Ftomcat%2Ffile-disable-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
45
46
47

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. This may allow unauthorized users to browse directories and access sensitive files, leading to potential information disclosure.
remediation: |
Disable directory listings by setting <listings>false</listings> in the web.xml file or by configuring the DefaultServlet appropriately to prevent directory browsing.
reference:
- https://isms.kisa.or.kr
- Cloud Vulnerability Assessment Guide(2024) by KISA
metadata:
verified: true
tags: tomcat,config,file,misconfiguration,directory-listing

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

headers:
Accept-Language: en

matchers-condition: and
matchers:
- type: status
status:
- 200

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

- type: word
part: body
words:
- "Directory Listing For"

- type: word
part: body
words:
- "<a href="


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