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
cortex9-keycloak-jwt-grant-alg-confusion-model — Offline differential model of Keycloak JWT grant HMAC algorithm confusion (CVE-2026-11800), educational | Kitploit
Tools/GitHubGitHub/federiconbaez/cortex9-keycloak-jwt-grant-alg-confusion-model
Vulnerability AnalysisCryptographyAuthenticationPapers & ResearchLearning & EducationLabs & Practice
GitHubfedericonbaez/cortex9-keycloak-jwt-grant-alg-confusion-model

cortex9-keycloak-jwt-grant-alg-confusion-model

Offline differential model of Keycloak JWT grant HMAC algorithm confusion (CVE-2026-11800), educational

View Repository
12 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.

    994
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    656
  • 3

    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.

    422
  • 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.

    389
  • 5

    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.

    333
  • 6

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    330

Explore all tools

Browse our collection of tools

View all tools →
Share

cortex9-keycloak-jwt-grant-alg-confusion-model

Offline differential model of CVE-2026-11800 (GHSA-j97h-3f8r-mrjr): Keycloak JWT validators backed by an IdP public key accepted symmetric (HMAC) alg values, enabling RS256→HS256 algorithm confusion. Fixed in 26.6.4. Educational, offline, deterministic.

Spanish: README.es.md. Exercises: PRACTICE.md.

Mechanism

Before the fix, Keycloak accepted HMAC signatures that used the IdP's configured public key as the secret. With a hardcoded public key, HardcodedPublicKeyLoader handled HS* algorithms by loading KeyUtils.loadSecretKey(Base64Url.decode(encodedKey)) (removed diff line 206). The configured value is normally PemUtils.encodeKey(publicKey), i.e. base64 of the DER SubjectPublicKeyInfo without PEM headers, so the HMAC secret was exactly the DER bytes of a key that is public by design. Anyone who knows the public key can sign an HS256 assertion that verifies. The validator did not stop it: before the fix it only checked for a null alg or a mismatch with an explicitly expected algorithm.

The fix (diff lines 64-96) makes validateSignatureAlgorithm reject none (case-insensitive) and, unless isSymmetricAlgorithmAllowed(), require an asymmetric ClientSignatureVerifierProvider for the header alg. It also removes the HMAC branch from the loader. Only JWTClientSecretValidator (shared client secret) keeps symmetric algorithms.

Two semantics, always side by side

Casepre (32cdceb8)post (6d61885f / 8970032a)
p01 HS256, HMAC over the DERACCEPTREJECT
p02 HS512, HMAC over the DERACCEPTREJECT
n06 HS256 keyed with the PEM textBAD_SIGNATUREREJECT
n01 RS256PROCEEDS_TO_SIGNATURE_CHECKsame
d01 alg=none (defense in depth)VALIDATOR_PASS_DOWNSTREAM_UNMODELEDREJECT

The positives are HS256/HS512 only. HS256 is backed by the upstream tests testHS256AlgorithmConfusion* in the fix diff (lines 253, 263-277, 279, 321, 351, 399, 408-421, 424); they sign with getPublicKey().getEncoded() (DER) and expect "Invalid signature algorithm". HS512 follows from the validator change (lines 85-89); no upstream test targets it specifically.

alg=none is not a positive: before the fix the validator lets it through, but whether the rest of the grant path rejects it is not modelled. It stays as a defense-in-depth case. 22 cases: 2 positive, 7 negative, 1 defense in depth and 12 adversarial.

Run

PYTHONPATH=src python -m unittest discover -s tests -v
python scripts/derive_expected.py | diff - fixtures/expected.tsv
python scripts/gen_results.py /tmp/r && diff -r results /tmp/r

See LIMITATIONS.md and SOURCES.md. License: Apache-2.0.

Download Tool