Skip to content
KitploitKITPLOIT
OutilsExploitsBlog
Log in
Soumettre
OutilsExploitsBlog
Soumettre

Outils de Hacking, PenTest et Cybersécurité pour votre Arsenal de Sécurité !

Kitploit est un répertoire d'outils de hacking, de cybersécurité et de pentesting. Découvrez les dernières mises à jour des projets pour trouver des vulnérabilités, analyser des systèmes, automatiser les tests et renforcer votre sécurité.

FluxContactConfidentialité© 2026 Kitploit

Répertoire d'outils

Catégories

Voir toutes les catégories
Loading categories
cortex9-oauthlib-token-grant-client-id-confusion-model — Offline educational model of CVE-2026-118669 (OAuthLib token-grant client_id confusion) | Kitploit
Outils/GitHubGitHub/federiconbaez/cortex9-oauthlib-token-grant-client-id-confusion-model
Authentication & AuthorizationVulnerability AnalysisCode AnalysisWeb SecurityPapers & ResearchLearning & EducationLabs & Practice
GitHubfedericonbaez/cortex9-oauthlib-token-grant-client-id-confusion-model

cortex9-oauthlib-token-grant-client-id-confusion-model

Offline educational model of CVE-2026-118669 (OAuthLib token-grant client_id confusion)

Voir le dépôt
il y a 12 joursPas encore vérifié
Partager
Contenu non disponible dans la langue demandée. Affichage de la version anglaise.

cortex9-oauthlib-token-grant-client-id-confusion-model

Offline model of CVE-2026-118669 (GHSA-7984-qgvg-3j9c): in OAuthLib before 4.0.0 the token grant handlers authenticate request.client as one client but keep an attacker-supplied client_id from the request body and pass it to validate_grant_type() and validate_scopes(). A client that authenticates as low and sends client_id=high gets grant and scope checks run as high when the application validator authorises by the client_id argument. Fixed by commit c951a1d09f99 (pre = before, post = after), released in 4.0.0.

Educational, offline, deterministic, Python stdlib only. oauthlib is not installed or imported; no HTTP request is made. The validator is the in-memory demo from the GHSA PoC (low: scopes read; high: read admin) plus batch, allowed only client_credentials.

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

What the fix changes (lines of the saved diff)

Diff linesprepost
117-124, 130 (client_credentials)authenticate_client, attribute check, validate_grant_type with the body client_id, then client_id = client_id or client.client_idvalidate_client_confidential (125) before the grant check
165, 180-184, 190-191 (password)client auth in create_token_response; fill after validate_grant_typevalidate_client_authentication inside validate_token_request (173)
23-28 (authorization_code), 150-152 (refresh_token), 235-243 (device_code)fill only if missing; refresh has no attribute checkremoved; binding happens in base.py
41-61 / 63-81 (base.py, added)—after authentication: client must have client_id (52-56 / 72-76); missing client_id is filled (58-59 / 78-79); a different one raises ServerError (60-61 / 80-81)
83-105 (base.py)inline confidential/public checks (87-103)dispatch to the two helpers
296-324, 345-353 (tests)—discrepancy → ServerError, missing attribute → NotImplementedError

base.py validate_grant_type / validate_scopes (unchanged by the fix, not in the diff) were read from the pre-fix file; see SOURCES.md.

Differential evidence (results/cases.tsv)

Caseprepost
p01 GHSA PoC, client_credentials, auth low, body client_id=high, scope=adminTOKEN_SPLIT: authenticated low, grant and scopes checked as high, admin grantedServerError (125; 58-61)
p02 same with passwordTOKEN_SPLITServerError (173; 58-61)
p03 batch (no password grant) sends client_id=highTOKEN_SPLITServerError
p05 public client, validator sets a different clientTOKEN_SPLITServerError (173; 78-81)
p06-p08 device / authorization code / refreshSTAGE_OK_SPLITServerError
n01, n02 GHSA controls (client_id=low, admin)InvalidScopeErrorsame
a01 no client_id in the body, policy argUnauthorizedClientError (grant checked as None)TOKEN
a03 validator authorises by request.clientTOKEN_SPLIT (scopes of low, token recorded as high)ServerError

*_SPLIT means the request finished with request.client_id different from request.client.client_id. STAGE_OK means the modelled steps passed for a grant whose code / refresh-token / device-code checks are not modelled.

Sweep (results/sweep.csv, 7,200 cases): post never ends split; every post success has request.client_id == request.client.client_id; every pre split becomes ServerError or NotImplementedError; when the body client_id equals the authenticated client the fix changes nothing.

Model observations, not findings: in pre, a client_credentials request without client_id in the body calls validate_grant_type(None, …) (the fill at diff:130 comes after the grant check), so a validator that authorises by the argument rejects it (a01). pre refresh_token with a client object lacking client_id raises a bare AttributeError at diff:151-152. Both depend on the demo validator.

Run

python3 tests/run.py                                    # any skip = failure
python3 scripts/derive_expected.py | diff - fixtures/expected.tsv
python3 scripts/derive_expected.py sweep | diff - results/sweep.csv
PYTHONPATH=src python3 -m oauthlib_model results fixtures/cases.tsv /tmp/r && diff -r results /tmp/r
PYTHONPATH=src python3 -m oauthlib_model case pre client_credentials confidential low auth high admin - arg

fixtures/cases.tsv holds hand labels; scripts/derive_expected.py re-derives every row from flat step lists without importing the model; the tests compare all three.

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

Télécharger l’outil

Populaires

Voir tout →

Découvrez les outils les plus utilisés par notre communauté.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 La boîte à outils OSINT ultime : graphe d'enquête, notation de confiance, familles d'alias, carte, chronologie et rapports. 49 modules, plus de 400 sites, aucune clé API requise.

    1.1k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    # Application d'exécution en un clic GhostLock (CVE-2026-43499)

    618
  • 3

    looking-glass

    anonghosty/looking-glass

    Plateforme CSIRT qui ingère les rapports Shadowserver dans MongoDB et les rejoue sous forme de cartes interactives, d'analyses, de constats, d'avis et de tableaux de bord exécutifs.

    411
  • 4

    ARTEX

    baarai/artex

    Plateforme autonome de tests d'intrusion multi-agents basée sur des LLM, avec agents planificateur/ouvrier, graphes d'actifs et d'exploration, enregistrement du trafic MITM et retest des vulnérabilités.

    328
  • 5

    jumpserver

    jumpserver/jumpserver

    JumpServer est une plateforme open-source de Gestion des Accès Privilégiés (PAM) qui offre aux équipes DevOps et IT un accès sécurisé et à la demande aux terminaux SSH, RDP, Kubernetes, bases de données et RemoteApp via un navigateur web.

    314
  • 6

    Aliens_eye

    arxhr007/aliens_eye

    Moteur OSINT alimenté par l'IA pour découvrir et cartographier plus de 7 700 identités sur les réseaux sociaux à travers le web

    275

Explorer tous les outils

Parcourez notre collection d'outils

Voir tous les outils →