Skip to content
KitploitKITPLOIT
工具漏洞利用博客
Log in
提交
工具漏洞利用博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
工具/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)

查看仓库
11天前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 终极 OSINT 工具包:调查图谱、置信度评分、别名家族、地图、时间线和报告。49 个模块、400+ 个站点,无需 API 密钥。

    1.0k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock 一键执行应用(CVE-2026-43499)

    593
  • 3

    looking-glass

    anonghosty/looking-glass

    CSIRT 平台,可将 Shadowserver 报告导入 MongoDB,并将其重放为交互式地图、分析、发现、公告和高管仪表板。

    381
  • 4

    ARTEX

    baarai/artex

    基于LLM的多智能体自主渗透测试平台,具备规划器/执行器智能体、资产与探索图谱、MITM流量记录以及漏洞复测功能。

    321
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    AI原生网络安全的行动系统——在这里,意图转化为受治理的执行,证据沉淀为运营记忆,每一次操作都让下一次更出色。

    316
  • 6

    redforge

    cybersecurity91/redforge

    浏览器端红队工具包,包含 102 个离线工具,用于侦察、载荷生成、凭据攻击、加密、编码和交战报告。

    305

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
内容在请求的语言中不可用。显示英文版本。

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.

下载工具