WordPress Debug Log - Exposure

漏洞信息

漏洞名称: WordPress Debug Log - Exposure

漏洞类型: 信息泄露

漏洞等级: 低危

漏洞描述: WordPress是一个广泛使用的开源内容管理系统(CMS),它允许用户创建和管理网站。由于其易用性和灵活性,WordPress在全球范围内被数百万网站所采用,从小型个人博客到大型企业网站都有使用。

该漏洞涉及WordPress的调试日志文件(debug.log)的暴露问题。当WordPress的调试模式被启用时,系统会生成debug.log文件,记录PHP警告和通知等信息。如果这些日志文件被放置在Web可访问的目录下(如wp-content、wordpress、wp或blog),攻击者可以通过直接访问这些日志文件来获取敏感信息,如系统路径、数据库查询错误等。

这种信息泄露漏洞虽然被归类为低危,但它可能为攻击者提供有价值的信息,用于进一步的攻击。例如,攻击者可以利用泄露的系统路径进行目录遍历攻击,或者利用数据库错误信息进行SQL注入攻击。由于无需认证即可访问这些日志文件,因此这种漏洞可以被自动化工具轻易利用。网站管理员应确保调试日志文件不被放置在Web可访问的目录下,并在生产环境中禁用调试模式,以减轻此类风险。

产品厂商: WordPress

产品名称: WordPress

来源: https://github.com/projectdiscovery/nuclei-templates/blob/ae70e1d5382b4014bdac416b6d9a85a83412439d/http%2Fvulnerabilities%2Fwordpress%2Fwordpress-debug-log.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

id: wordpress-debug-log

info:
name: WordPress Debug Log - Exposure
author: geraldino2,dwisiswant0,philippedelteil,FLX
severity: low
description: Exposed Wordpress debug log.
metadata:
max-request: 4
tags: wp,wordpress,log,exposure

http:
- method: GET
path:
- "{{BaseURL}}/{{paths}}/debug.log"

payloads:
paths:
- 'wp-content'
- 'wordpress'
- 'wp'
- 'blog'

stop-at-first-match: true
host-redirects: true
max-redirects: 3
max-size: 5000
matchers-condition: and
matchers:
- type: dsl
dsl:
- 'regex("[[0-9]{2}-[a-zA-Z]{3}-[0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2} [A-Z]{3}] PHP", body)'
- 'contains_any(body, "PHP Warning:", "PHP Notice:", "Undefined array", "Undefined variable")'
- 'status_code == 200'
condition: and

extractors:
- type: dsl
dsl:
- to_string(content_length)+ " bytes"
# digest: 490a00463044022021ec7827a42ff27e8a7fc994497ca6ab5534143f2793d0130d1fe35d739694180220057d84f54cd498c9673af7360fc84d2c49002ebf004042ea662e9f32e11debe0:922c64590222798bb761d5b6d8e72950


WordPress Debug Log - Exposure
http://example.com/2025/07/22/github_2403177857/
作者
lianccc
发布于
2025年7月22日
许可协议