Skip to content

fix(deps): bump click to 8.3.3 for CVE-2026-7246 - #4189

Merged
Jan-Kazlouski-elastic merged 8 commits into
mainfrom
jan-kazlouski/12534-cve-2026-7246-fix
Jul 17, 2026
Merged

fix(deps): bump click to 8.3.3 for CVE-2026-7246#4189
Jan-Kazlouski-elastic merged 8 commits into
mainfrom
jan-kazlouski/12534-cve-2026-7246-fix

Conversation

@Jan-Kazlouski-elastic

@Jan-Kazlouski-elastic Jan-Kazlouski-elastic commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Closes https://github.com/elastic/security/issues/12534

Bump the direct click pin from 8.1.7 to 8.3.3 to clear CVE-2026-7246 (command injection in click.edit()). Connectors does not call click.edit(), so product impact is Not Affected; the bump is proactive for scanner/SBOM findings.

CLI subgroups (connector / index / job) now use the same invoke_without_command + manual help pattern as the root CLI, so bare subgroup help still exits 0 under Click 8.2+ (avoids no_args_is_help exit 2). Create fixtures were updated for Click 8.2+ prompt/EOF behavior in tests and assert indexed field alignment.

Scanner A/B (CVE-2026-7246)

Tool Before After
pip-audit reported clear
Trivy n/a n/a
Snyk n/a n/a

Checklists

Pre-Review Checklist

  • this PR does NOT contain credentials of any kind, such as API keys or username/passwords (double check config.yml.example)
  • this PR has a meaningful title
  • this PR links to all relevant github issues that it fixes or partially addresses
  • this PR has a thorough description
  • Covered the changes with automated tests
  • Tested the changes locally
  • Added a label for each target release version
  • For bugfixes: backport safely to all minor branches still receiving patch releases

Changes Requiring Extra Attention

  • Security-related changes (encryption, TLS, SSRF, etc)

Release Note

Bump click to 8.3.3 to address CVE-2026-7246.

Jan-Kazlouski-elastic and others added 4 commits July 16, 2026 22:59
Click <8.3.3 has command injection in click.edit(); bump the direct pin
to the fixed release. Connectors does not call click.edit(), but the bump
clears scanner findings.

Closes elastic/security#12534

Co-authored-by: Cursor <cursoragent@cursor.com>
Click 8.2+ exits 2 for no_args_is_help and no longer applies prompt
defaults on EOF, which broke create/help fixtures after the 8.3.3 bump.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Split Click option vs Mongo config prompts, assert indexed field
alignment, and cover Click 8.2+ exit code 2 for bare subgroups.

Co-authored-by: Cursor <cursoragent@cursor.com>
Jan-Kazlouski-elastic and others added 2 commits July 16, 2026 23:17
Use the same invoke_without_command + manual help pattern as the root
CLI so connector/index/job without a subcommand do not inherit Click's
no_args_is_help exit code 2.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Jan-Kazlouski-elastic
Jan-Kazlouski-elastic enabled auto-merge (squash) July 17, 2026 13:10
@Jan-Kazlouski-elastic Jan-Kazlouski-elastic self-assigned this Jul 17, 2026
@Jan-Kazlouski-elastic
Jan-Kazlouski-elastic merged commit 3595f97 into main Jul 17, 2026
4 checks passed
@Jan-Kazlouski-elastic
Jan-Kazlouski-elastic deleted the jan-kazlouski/12534-cve-2026-7246-fix branch July 17, 2026 15:03
@github-actions

Copy link
Copy Markdown

💔 Failed to create backport PR(s)

Status Branch Result
9.5 #4211
9.3 #4212
9.4 #4213
8.19 Commit could not be cherrypicked due to conflicts

Successful backport PRs will be merged automatically after passing CI.

To backport manually run:
backport --pr 4189 --autoMerge --autoMergeMethod squash

Jan-Kazlouski-elastic added a commit that referenced this pull request Jul 17, 2026
Backports the following commits to 9.3:
 - fix(deps): bump click to 8.3.3 for CVE-2026-7246 (#4189)

Co-authored-by: Jan-Kazlouski-elastic <jan.kazlouski@elastic.co>
Co-authored-by: Cursor <cursoragent@cursor.com>
Jan-Kazlouski-elastic added a commit that referenced this pull request Jul 17, 2026
Backports the following commits to 9.5:
 - fix(deps): bump click to 8.3.3 for CVE-2026-7246 (#4189)

Co-authored-by: Jan-Kazlouski-elastic <jan.kazlouski@elastic.co>
Co-authored-by: Cursor <cursoragent@cursor.com>
Jan-Kazlouski-elastic added a commit that referenced this pull request Jul 17, 2026
Backports the following commits to 9.4:
 - fix(deps): bump click to 8.3.3 for CVE-2026-7246 (#4189)

Co-authored-by: Jan-Kazlouski-elastic <jan.kazlouski@elastic.co>
Co-authored-by: Cursor <cursoragent@cursor.com>
Jan-Kazlouski-elastic added a commit that referenced this pull request Jul 20, 2026
Backports the following commits to 8.19:
 - fix(deps): bump click to 8.3.3 for CVE-2026-7246 (#4189)

The 8.19 branch uses `requirements/framework.txt` (not the `main`
layout), so the pin was applied there. The Click 8.2+ behavior changes
from the original PR were ported to the 8.19 CLI: the
`connector`/`index`/`job` groups now use `invoke_without_command` +
manual help (bare invocation stays exit 0 instead of Click 8.2+
`no_args_is_help` exit 2), and the `connector create` tests were updated
to feed explicit values for every prompt (Click 8.2+ no longer applies
prompt defaults on EOF).

Validated locally on Python 3.11: `tests/test_connectors_cli.py` passes
(44 passed) with `click==8.3.3`, and `ruff check`/`ruff format --check`
are clean.

Made with [Cursor](https://cursor.com)

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants