Skip to content

Backport #104009 to 25.8: Fix SQL injection in ExternalQueryBuilder via incorrect string escaping - #105181

Merged
tiandiwonder merged 2 commits into
25.8from
backport/25.8/104009
Jul 15, 2026
Merged

tiandiwonder merged 2 commits into
25.8from
backport/25.8/104009

Conversation

@robot-ch-test-poll1

@robot-ch-test-poll1 robot-ch-test-poll1 commented May 17, 2026 •

Copy link
Copy Markdown
Contributor

Original pull-request #104009
Cherry-pick pull-request #105180

This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.

The PR source

The PR is created in the CI job

Version info

  • Merged into: 25.8.29.17

@robot-ch-test-poll1 robot-ch-test-poll1 added pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-critical-bugfix labels May 17, 2026
@clickhouse-gh

clickhouse-gh Bot commented May 17, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [ea13bcb]

@fm4v fm4v closed this May 25, 2026
`Common/VectorWithMemoryTracking.h` does not exist on 25.8 and
`composeLoadKeysQuery` takes `std::vector<size_t>` there (not
`VectorWithMemoryTracking<size_t>`), which broke the amd_debug build of
the original backport #105181. Drop the missing include and use
`std::vector<size_t>` for the row indices.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@tiandiwonder tiandiwonder reopened this Jul 15, 2026
@tiandiwonder

Copy link
Copy Markdown
Contributor

Reopened after fixing the build failure that caused this to be closed.

The amd_debug build broke because the new unit test src/Dictionaries/tests/gtest_external_query_builder.cpp included Common/VectorWithMemoryTracking.h, which does not exist on 25.8, and called composeLoadKeysQuery with a VectorWithMemoryTracking<size_t>. On 25.8 that method takes std::vector<size_t>. Fixed by dropping the missing include and using std::vector<size_t> for the row indices (commit 8aa22b8). The security fix itself is unchanged.

25.8 is the currently supported LTS per SECURITY.md, so this backport is still needed.

@tiandiwonder
tiandiwonder merged commit c90f25f into 25.8 Jul 15, 2026
34 checks passed
@tiandiwonder
tiandiwonder deleted the backport/25.8/104009 branch July 15, 2026 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-critical-bugfix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants