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
keycloak-saml-redirect-param-split — Loopback PoC for a Keycloak 26.8.1 SAML broker flaw: a percent-encoded duplicate SAMLResponse name bypasses redirect signature verification, allowing login as another user. | Kitploit
Tools/GitHubGitHub/abraxas/keycloak-saml-redirect-param-split
Vulnerability AnalysisExploitationWeb Application ExploitationIdentity & Access Management (IAM)AuthenticationLabs & Practice
GitHubabraxas/keycloak-saml-redirect-param-split

keycloak-saml-redirect-param-split

Loopback PoC for a Keycloak 26.8.1 SAML broker flaw: a percent-encoded duplicate SAMLResponse name bypasses redirect signature verification, allowing login as another user.

View Repository
111 day agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

Abraxas Labs - keycloak-saml-redirect-param-split

keycloak-saml-redirect-param-split

Someone with no Keycloak account can finish a company SAML login as another person. They sign in once at the upstream identity provider, keep that signed redirect, and stick a second SAML document in front of it under a percent-encoded name. Keycloak checks the honest signature and then logs them in as the name in the forged document. This needs a SAML broker that signs HTTP-Redirect responses, with signature validation on and assertion signatures left off, which is what metadata import configures. It is not the semicolon split from issue #53354.

Class: OAuth leftover Reach: Remote (unauthenticated to Keycloak; needs a redirect-signing SAML broker)

Keycloak 26.8.1 (24ed1dad) - Red Hat

IDno CVE yet
ClassOAuth leftover
ReachRemote (no Keycloak account; needs one genuine HTTP-Redirect signature from the IdP)
CWECWE-287 / CWE-347 / CWE-116
CVSSHigh: 7.4 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
ProductKeycloak
Affected26.8.1 (24ed1dadf3f246a555adb6d3d4a99e9b3003fb3b); Quarkus 3.40.1; image quay.io/keycloak/keycloak:26.8.1
Authnone on Keycloak. Needs a SAML identity-provider broker with validateSignature=true and wantAssertionsSigned absent or false.
LicenseGNU Affero GPL v3.0
Lab127.0.0.1:18084 only

What an attacker can do

Needs the victim NameID (usually an email) and one real signed HTTP-Redirect from that IdP. Does not need a Keycloak password. Does not need a mailbox. A POST-only IdP does not hand over that signature. The GET ACS stays mounted even when metadata import prefers POST.

PrivilegeMethod / sinkRecon / integrity / availabilityLab-proven or inferred
Bind a forged SAML document while the honest signature still verifiesGET broker ACS with SAML%52esponse=<forged> ahead of signed SAMLResponseIntegrity (authn)Lab-proven. Control email [email protected]. Attack email [email protected]
Create the victim user through first-broker-logincallback.authenticated on the forged NameIDIntegrity (account create)Lab-proven. Victim count 0 before the split query, 1 after
Session as an existing brokered user, including an admin who uses the same IdPSame ACS, NameID of that userIntegrity (account takeover)Inferred. Lab created the victim on first login
Keep RelayState and the auth sessionRelayState stays the signed valueIntegritySource. Signature covers RelayState
Negative controlHonest signed redirect, no extra parametern/aLab-proven. Control finishes as the attacker email

Stays closed on this leftover

AxisMethod / sinkWhy it is closed
IntegritySemicolon split SAMLResponse=...;SAMLResponse=...issue #53354. quarkus.http.use-semicolon-as-query-param-delimiter=false
IntegrityUnsigned assertion when wantAssertionsSigned=truehandleLoginResponse then requires an assertion signature
IntegrityNo SAML broker, or POST-only IdP with no redirect signatureAttacker never obtains SigAlg + Signature on a GET
IntegrityHost RCE, unauthenticated Admin RESTOut of class
IntegrityDefault VERIFY_PROFILE name formLab-proven as a completion step, not a disproof. The form already holds the brokered email

How I found it

I pinned Keycloak 26.8.1. RESTEasy Reactive takes @QueryParam("SAMLResponse") from Vert.x, which percent-decodes query names, so SAML%52esponse collapses onto SAMLResponse and the first value wins. verifyRedirectSignature rebuilds the signed string from getQueryParameters(false) on the raw query, where that name stays a different key.

Wrong turns already recorded: treating #53354 as this leftover (percent-encoded name, not semicolon); following ACS 302s in the lab client and dropping AUTH_SESSION_ID; reading empty firstName/lastName on VERIFY_PROFILE as a miss (the email is already the brokered NameID); a reverse shell. Theatre.

Lab

Python 3.11+ with cryptography. Docker required.

python3 keycloak-saml-redirect-param-split-Abraxas-Labs.py

or:

cd lab
./run.sh

Target only http://127.0.0.1:18084. Image quay.io/keycloak/keycloak:26.8.1. The launcher chdirs into lab/ and execs run.sh. The lab IdP is in-process. It never talks to a real identity provider.

IOC image=quay.io/keycloak/keycloak:26.8.1 label-version=26.8.1
IOC serverinfo-version=26.8.1
IOC validate-signature=true want-assertions-signed=absent
IOC review-profile=DISABLED
IOC [email protected]
IOC victim-before=0
IOC [email protected]
IOC victim-after=1
SUCCESS KC-H04-SAML-REDIRECT kcs04b8n1

The fix

Verify the same query document the endpoint parses. Percent-decode parameter names before signature reconstruction, or reject a query that contains more than one SAMLResponse after decoding. Turn wantAssertionsSigned on for redirect brokers, including the metadata-import path.

References

  • github.com/keycloak/keycloak tag 26.8.1 (24ed1dadf3f246a555adb6d3d4a99e9b3003fb3b)
  • SAMLEndpoint.redirectBinding (SAMLEndpoint.java:182-183, :779-813, :896-914)
  • SamlProtocolUtils.verifyRedirectSignature (SamlProtocolUtils.java:216-249)
  • KeycloakUriInfo.getQueryParameters (KeycloakUriInfo.java:147-163)
  • Nearby (not this path): issue #53354 semicolon split
  • CWE-287 · CWE-347 · CWE-116

License

GNU Affero GPL v3.0. See LICENSE. Loopback lab only. No warranty.

Abraxas Labs [email protected]

Please credit CVE to Abraxas Labs.

Download Tool