Submeter #1070437: shareAI-lab Kode CLI 2.2.0 Improper Authorizationinformação

TítuloshareAI-lab Kode CLI 2.2.0 Improper Authorization
DescriçãoKode CLI up to 2.2.0 is fail-open when a settings file exists but cannot be read or parsed. Permission rules stored under permissions.deny and permissions.ask are silently discarded, and in acceptEdits mode a write to a protected path such as .env, .npmrc, PEM key material or a CI workflow file is auto-approved without a prompt. Losing ask rules is the sharper half: a path the operator marked as always prompt becomes a silent write, while the tool still exits with code 0 and writes nothing to stderr. readSettingsFile in packages/config/src/files.ts catches every read and JSON.parse error, logs it only when NODE_ENV is test, and returns null. loadToolPermissionContextFromDisk then registers no allow, deny or ask rules for that source, the deny and ask checks in packages/core/src/permissions/engine.ts have nothing to match, and the acceptEdits branch allows the write because the path is inside the working directories. The engine permits the write only because no rule matched, so a policy that failed to load is indistinguishable from one that was never configured. It has no unknown state and cannot tell an allowed write from an unreadable policy, which makes this an authorization bypass rather than a missing filter. The built-in blocklist covers .git, .ssh, .kode and a few dotfiles, but not .env, .npmrc, PEM keys or .github/workflows, so there the user rule is the entire boundary. The trigger is an ordinary event such as a truncated write, a merge conflict, a permission change or a directory in place of the file; the attacker only supplies the instruction that makes the model write the path. Affected deployments are unattended print-mode jobs that consume JSON output, and interactive sessions in yolo mode. Verified on the published npm package @shareai-lab/kode 2.2.0: an intact policy denies the write, while the same file truncated by one byte lets it through with the model-supplied content.
Fonte⚠️ https://github.com/shareAI-lab/Kode-CLI/issues/253
Utilizador
 EM111 (UID 102699)
Submissão02/11/2026 18h01 (há 26 dias)
Moderação28/11/2026 08h28 (26 days later)
EstadoAceite
Entrada VulDB445074 [shareAI-lab Kode-CLI até 2.2.1 Permission Settings Loader files.ts readSettingsFile Elevação de Privilégios]
Pontos20

Want to stay up to date on a daily basis?

Enable the mail alert feature now!