Path traversal: unsanitized provider id flows into credential storage path #9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: Medium
packages/core/src/auth/store.ts:13→packages/core/src/storage/index.ts:19credentialIdFor(packages/core/src/provider/catalog.ts:155) returns the raw provider string when it is not in the catalog. Sothorny auth login ../../../etc/fooresolves to a path outside the store root — enabling arbitrary.jsonread (get), write (set), and delete (remove). The same untrusted-key-into-path pattern applies to any storage key built from external input.Impact
Local and partly self-inflicted, but a real input-validation gap: think a copy-pasted command from a malicious README, or a wrapper script that forwards an attacker-controlled provider name.
Fix
^[a-z0-9._-]+$(reject/and..) before they reach the store, orrootbefore any fs operation.Found via security audit.