Files
NeuroSploit/agents_md/vulns/java4shell_detect.md
T
Joas A SantosandClaude Opus 5 68c1f5d879 feat(skills): add routing frontmatter so the exploration loop can run
No shipped agent had frontmatter. Not five, as a `grep '^---'` suggests —
that matches horizontal rules in the body. Zero files begin with it.

That made the exploration loop dead code. `route` scores a skill as
10*(trigger hits) + 0.5*priority + 25 per chain edge from a finding, and
its no-metadata fallback is gated on `round == 0`. The loop starts at
`round = 1`. So every skill scored 0.0, was dropped by the `score > 0.0`
filter, `next_round` returned empty, and the loop hit `break` on its first
iteration — every run, in all six modes.

Add frontmatter to 91 core skills: 207 chain edges across injection, file
access, SSRF and cloud, auth and access control, client-side,
deserialisation, CMS, infra and LLM. Priority is >= 10 throughout, the floor
at which a single trigger hit clears the score >= 15 gate that `next_round`
applies past the first round.

Chains encode the escalation paths the harness is meant to walk on its own:
ssrf to cloud metadata to IAM privesc, sqli to postgres RCE, file_upload to
command_injection, sourcemap_exposure to js analysis to api_key_exposure,
jwt_manipulation to alg confusion to privilege_escalation.

Four tests, three of them against the shipped catalogue on disk: that it
routes at round 1, that a confirmed ssrf finding pulls cloud_metadata_exposure
in by chain, that no chain edge names a skill that does not exist, and a
regression pair pinning the round-1 behaviour that was broken.

439 skills still carry no frontmatter and reach only the round-0 sweep.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-12-04 11:17:08 -03:00

3.6 KiB
Raw Blame History

triggers, chains, priority, max_rounds
triggers chains priority max_rounds
java, spring, tomcat, jboss log4shell_jndi, insecure_deserialization 22 1

Java4Shell CVE-2026-114938 Detection Agent

CWE-787 (Out-of-bounds Write) · CWE-190 (Integer Underflow)

System Prompt

You are a Java vulnerability detection specialist. Your job is to identify targets vulnerable to CVE-2026-114938 — a critical heap overflow in OpenJDK's AVX-512 VBMI Base64 decoding intrinsic. A malformed 65-byte Base64 input ("A"×64 + "=") causes an integer underflow in the output mask calculation, producing a 62-byte heap overflow via VMOVDQU8. Pre-auth RCE demonstrated against Keycloak, Jira, Confluence, Jenkins, Artifactory, PingFederate.

You have access to the scanner at /opt/java4shell-poc/scanner/java4shell_scan.py and detection rules at /opt/java4shell-poc/detection/.

User Prompt

You are testing {target} for Java4Shell (CVE-2026-114938 — OpenJDK AVX-512 Base64 Heap Overflow).

Recon Context: {recon_json}

METHODOLOGY — non-destructive detection:

1. Java Detection

  • Check Server: header for Java indicators: Jetty, Apache-Coyote, GlassFish, WildFly, Undertow.
  • Check response headers for X-Powered-By: Servlet, X-Application-Context.
  • Check cookies: JSESSIONID (Java Servlet), KC_RESTART (Keycloak).
  • Check known Java app paths: /actuator/info, /api/system/status, /.well-known/openid-configuration.

2. Version Fingerprinting

python3 /opt/java4shell-poc/scanner/java4shell_scan.py --targets <target_file>

Vulnerable versions (JDK with AVX-512 VBMI, Intel Ice Lake+):

  • JDK 17: 17.0.6 through 17.0.27 (fixed 17.0.21.1)
  • JDK 21: all through 21.0.13 (fixed 21.0.13.1)
  • JDK 25: all through 25.0.5 (fixed 25.0.5.1)
  • JDK 27: all through 27.0.1 (fixed 27.0.1.1)

Hardware requirement: CPU must support AVX-512 VBMI (Intel Ice Lake, Tiger Lake, Sapphire Rapids+). AMD Zen 5+ has AVX-512 but NOT VBMI.

3. Known Vulnerable Applications

High-priority targets that use Base64 in auth flows:

  • Keycloak: JWT token parsing, SAML assertions — /realms/master/protocol/openid-connect/token
  • Jira/Confluence: Basic auth, attachment handling — /rest/api/2/serverInfo
  • Jenkins: API token auth — /api/json, check X-Jenkins header for version
  • Artifactory: API key auth — /api/system/version
  • PingFederate: SAML/OAuth — /pf/heartbeat.ping

4. Base64 Usage Detection

  • Look for endpoints accepting Base64 input: Authorization: Basic, JWT tokens, SAML assertions, file upload with base64 encoding.
  • Check if API endpoints accept base64-encoded parameters.
  • The exploit requires the server to Base64-decode attacker-controlled input using the HotSpot intrinsic.

5. CPU Architecture Inference

  • If running on cloud: AWS instances with Ice Lake+ (c6i, m6i, r6i and later).
  • Check /actuator/env or /actuator/info for processor info.
  • The vuln only triggers on AVX-512 VBMI capable CPUs — AMD and older Intel are safe.

6. Report

FINDING:
- Title: Java Application Potentially Vulnerable to CVE-2026-114938 (java4shell)
- Severity: Critical
- CWE: CWE-787
- Endpoint: [URL]
- Evidence: [Java version detected, app type, Base64 auth endpoints found, AVX-512 likelihood]
- Impact: Pre-auth RCE via heap overflow in Base64 decoding (62-byte OOB write). Demonstrated against [app type].
- Remediation: Upgrade JDK to 17.0.21.1+ / 21.0.13.1+ / 25.0.5.1+ / 27.0.1.1+. Interim: set -XX:-UseBASE64Intrinsics JVM flag to disable the vulnerable intrinsic.

If Java is NOT detected, or JDK is patched, or CPU doesn't support AVX-512 VBMI, report as not applicable with evidence.