Skip to content

Cherry pick #99122 to 25.8: Fix RBAC bypass for DESCRIBE/CREATE TABLE AS via table functions - #107584

Merged
robot-ch-test-poll4 merged 5 commits into
backport/25.8/99122from
cherrypick/25.8/99122
Jul 28, 2026
Merged

robot-ch-test-poll4 merged 5 commits into
backport/25.8/99122from
cherrypick/25.8/99122

Conversation

@robot-clickhouse-ci-2

Copy link
Copy Markdown
Contributor

Original pull-request #99122

Do not merge this PR manually

This pull-request is a first step of an automated backporting.
It contains changes similar to calling git cherry-pick locally.
If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.

The check results does not matter at this step - you can safely ignore them.

Troubleshooting

If the conflicts were resolved in a wrong way

If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:

  • delete the pr-cherrypick label from the PR
  • delete this branch from the repository

You also need to check the Original pull-request for pr-backports-created label, and delete if it's presented there

The PR source

The PR is created in the CI job

pufit and others added 4 commits March 9, 2026 19:09
DESCRIBE TABLE and CREATE TABLE AS on table functions like mysql(),
postgresql(), sqlite(), etc. resolved structure without checking source
access, leaking schema info and triggering outbound connections (SSRF).

Add getActualTableStructureWithAccess() that bundles the source access
check with structure resolution. Use it in InterpreterDescribeQuery,
InterpreterCreateQuery, and getStructureOfRemoteTable.

Remove redundant per-function access checks from url(), s3()/azure(),
and file() that were partial (only guarded auto-detection path) and
inconsistent (s3/file missed URI-level filtering).
DESCRIBE remote() now requires source access via
getActualTableStructureWithAccess in addition to SHOW_COLUMNS.
DESCRIBE TABLE url() with explicit structure now requires READ ON URL.
Update test to expect ACCESS_DENIED instead of success.
…n-rbac-bypass

Fix RBAC bypass for DESCRIBE/CREATE TABLE AS via table functions
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! do not test disable testing on pull request pr-critical-bugfix labels Jun 16, 2026
@robot-clickhouse-ci-1

Copy link
Copy Markdown
Contributor

Dear @serxa, @alexey-milovidov, @pufit, this cherry-pick PR has not been updated for 3d0h1m41s. Please resolve the conflicts to backport #99122, or close this PR if the backport is no longer needed. This PR will be automatically closed after 7 days of inactivity.

@robot-clickhouse

Copy link
Copy Markdown
Member

Dear @serxa, @alexey-milovidov, @pufit, this cherry-pick PR has not been updated for 7d2h14m32s. Closing automatically. If you still want to backport #99122, please resolve the conflicts and reopen this PR.

@robot-clickhouse

Copy link
Copy Markdown
Member

Dear @serxa, @alexey-milovidov, @pufit, this PR is opened while #99122 was marked as backported. The pr-backports-created is removed, so the original PR can be processed again.

If the cherry-pick is not needed anymore, then just close this PR.

1 similar comment
@robot-ch-test-poll3

Copy link
Copy Markdown
Contributor

Dear @serxa, @alexey-milovidov, @pufit, this PR is opened while #99122 was marked as backported. The pr-backports-created is removed, so the original PR can be processed again.

If the cherry-pick is not needed anymore, then just close this PR.

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

Labels

do not test disable testing on pull request pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! pr-critical-bugfix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants