
Scanner and two-stage exploit for CVE-2017-12149, the JBoss EAP/AS 5.x HTTP Invoker deserialization RCE, probing /invoker/* endpoints with CSV/JSON reporting.
Jboss Application Server - Remote Code Execution (HTTP Invoker unrestricted deserialization)
| field | value |
|---|---|
| CVE | CVE-2017-12149 |
| severity | critical |
| CVSS | 9.8 (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H; NVD CVSS:3.1 also 9.8) |
| fixed in | 5.2.0-24.ep5 (RHSA-2018:1607 / RHSA-2018:1608, May 2018) |
| class | deserialization RCE (CWE-502), CISA KEV listed 2021-12-10 |
| scanner version | 1.0.0 |
| python | 3.8+ stdlib only, no third-party deps |
If you want the exploit, find it here: https://satoshidisk.com/pay/CT5RZh
In Red Hat JBoss EAP/AS 5.x the HTTP Invoker component (shipped as
http-invoker.sar) exposes /invoker/JMXInvokerServlet/,
/invoker/EJBInvokerServlet/ and /invoker/readonly. The doFilter
method of the ReadOnlyAccessFilter (and the invoker servlets that
follow it) calls ObjectInputStream.readObject() on the raw request
body with no class restriction, so any gadget chain present on the
server classpath is instantiated during the cast to
org.jboss.invocation.ObjectParameter. The nuclei template probes each
endpoint with a serialized java.util.ArrayList holding the strings
"element 1" and "element 2" and reads the marker text back. EAP 6 and 7
do not ship the http invoker and are not affected.
ReadOnlyAccessFilter.doFilter opens an ObjectInputStream over
ServletRequest.getInputStream(), deserializes the object, and casts
it to ObjectParameter to dispatch a JMX or EJB invocation. Because
readObject() runs with no ObjectInputFilter / class allowlist, the
first class token in the stream drives instantiation: ysoserial-style
chains (CommonsCollections5, URLDNS, ...) execute their readObject
hooks during that first read. For the plain template probe the stream
holds an ArrayList, so the cast yields a visible
ClassCastException: java.util.ArrayList cannot be cast to ... plus the
JBoss server banner in the response body, which is exactly what the
template matches. Remediation per the vendor: apply RHSA-2018:1607 /
RHSA-2018:1608, or secure the http-invoker context by adding
<url-pattern>/*</url-pattern> security-constraints in the
http-invoker.sar web.xml, or remove http-invoker.sar if the HTTP
invoker is unused.
http/cves/2017/CVE-2017-12149.yaml
exactly: max-request: 3 = the three raw POST shapes below.POST /invoker/JMXInvokerServlet/,
POST /invoker/EJBInvokerServlet/ and POST /invoker/readonly, each
with Content-Type: application/octet-stream and the base64 body
rO0ABXNyABNqYXZhLnV0aWwuQXJyYXlMaXN0... (serialized
ArrayList["element 1", "element 2"]).JBoss and ClassCastException in the response body,
and status code in {200, 500}. check(url) is True when any of the
three endpoints satisfies both.fetch/post retry twice with linear backoff; HTTPError bodies
are read because 500 is an accepted matcher status.urls.txt (tagger output such as
host:8080/path) are auto-prefixed with http://.status, hit, matched words and
a 200-char snippet plus request_count (3), so a row is auditable
offline from result_b64.# scanner: streamed CSV + optional JSON sidecar
python scanner/CVE-2017-12149/scanner.py urls.txt 8 CVE-2017-12149.csv --json CVE-2017-12149.json
# exploit: result dict + optional CSV/JSON dumps
python exploit/CVE-2017-12149/exploit.py http://target:8080 --csv CVE-2017-12149.csv --json CVE-2017-12149.json --verbose
urls.txt is a plain file, one target per line, # for comments.
[*] JBoss EAP 5.x CVE-2017-12149 scanner (HTTP invoker deserialization /invoker/* endpoints)
scanner : CVE-2017-12149 v1.0.0
threads : 8 | csv: CVE-2017-12149.csv | json: CVE-2017-12149.json
[*] JBoss EAP 5.x CVE-2017-12149 scanner (HTTP invoker deserialization /invoker/* endpoints)
[2026-12-03 11:37:11] loaded 2 target(s) from urls.txt
[2026-12-03 11:37:12] [1/2] http://jboss-host:8080 -> VULNERABLE
[2026-12-03 11:37:12] [2/2] http://other-host:8080 -> not-vuln
[2026-12-03 11:37:12] summary: total=2 vulnerable=1 not-vuln=1 errors=0
[2026-12-03 11:37:12] timing : avg=640ms max=910ms wall=1.28s
[2026-12-03 11:37:12] report saved: CVE-2017-12149.csv
| column | meaning |
|---|---|
| n | 1-based row number |
| url | target as provided |
| status | ok / error |
| vulnerable | verdict |
| elapsed_ms | per-target timing |
| token | 12-char md5 over the row details |
| result_b64 | base64(JSON) full details |
scanner.py - detection only, stdlib, streamed CSV + JSON sidecar.README.md - this file.DESCRIPTION.md - deeper technical notes.../../exploit/CVE-2017-12149/exploit.py - two-stage POC.| code | meaning |
|---|---|
| 0 | at least one target answered |
| 2 | every target errored or no targets loaded |