Skip to content

duckdb-hardening: userinfo in an allowed http(s) URL is readable by templates via allowed_directories #266

Backlog

Description

@jrosskopf

Under external-access: restricted (#253), AllowListEntry strips only the query string of http(s) entries (StripQuery in src/vfs_adapter.cpp). Userinfo (https://user:token@host/dir/) - from allowed-directories or a remote config URL that carries it - is kept in DuckDB's allowed_directories setting, which any template can read with current_setting('allowed_directories') or duckdb_settings(). The startup log line is redacted; the setting is not.

Low severity: credentials in a URL's userinfo are rare and already discouraged. Options: refuse userinfo in allow-list entries with a startup error naming the key, or strip it (DuckDB's prefix match would then not cover requests that carry it).

Found by the cross-PR review of #261.

🤖 Generated with Claude Code

https://claude.ai/code/session_018txuxF9jXyiKakpUoXrKBi

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions