vllm - ✅(Solved) Fix Backport CVE-2026-22807 (transformers-backend trust_remote_code) to releases/v0.11.2? [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vllm-project/vllm#41273Fetched 2026-04-30 06:19:12
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×2added_to_project_v2 ×1project_v2_item_status_changed ×1

Fix Action

Fix / Workaround

CVE-2026-22807 patch 78d13ea9 doesn't look to be present on releases/v0.11.2:

PR fix notes

PR #41311: [CVE Backport] Handle trust_remote_code for transformers backend (releases/v0.12.0)

Description (problem / solution / changelog)

Summary

Backport of #32194 (commit 78d13ea9, "[Model] Handle trust_remote_code for transformers backend") to releases/v0.12.0. The upstream change closes CVE-2026-22807: the transformers-backend custom-code path could load remote *.py definitions without honoring the --trust-remote-code gate.

Tracking issue: #41275 (vulgraph reported the same gap on every release branch in support — #41157 v0.11.0, #41271 v0.11.1, #41273 v0.11.2, #41275 v0.12.0). This PR addresses v0.12.0; if accepted I'll send the same patch to the other three.

What changes

Verbatim cherry-pick of 78d13ea9. Two files, +14/-1:

  • vllm/transformers_utils/dynamic_module.py — adds a trust_remote_code: bool parameter to try_get_class_from_dynamic_module and calls transformers.dynamic_module_utils.resolve_trust_remote_code(...) before forwarding to get_class_from_dynamic_module. Imports resolve_trust_remote_code.
  • vllm/model_executor/models/registry.py — both call sites in _try_resolve_transformers (the warn_on_fail=False and warn_on_fail=True arms) now thread trust_remote_code=model_config.trust_remote_code through.

resolve_trust_remote_code is a long-standing helper in transformers.dynamic_module_utils; this branch already pins transformers >= 4.56.0, < 5, so the import is safe.

Why it isn't a duplicate

gh pr list --repo vllm-project/vllm --base releases/v0.12.0 --state open and searches for 32194 in:body and 78d13ea9 in:body (state: all) returned no existing PR against any release branch. The reporter offered the cherry-pick on each issue but hasn't sent one yet.

Tests run

  • git cherry-pick -x 78d13ea9 — applied cleanly, no conflicts.
  • ruff check on both touched files — clean.
  • ruff format --check on both touched files — already formatted.
  • mypy --python-version 3.10 --ignore-missing-imports vllm/transformers_utils/dynamic_module.pySuccess: no issues found in 1 source file.
  • typos on both touched files — clean.
  • python -c "import ast; ast.parse(...)" on both files — OK.
  • grep -rn try_get_class_from_dynamic_module across the branch — only two callers exist (both in registry.py); both pass the new kwarg.

The upstream commit shipped without a regression test and there's no existing test that exercises try_get_class_from_dynamic_module, so I haven't added one here either — the goal of this PR is byte-identical behavior with main.

AI assistance disclosure

Claude (Anthropic) assisted with: locating the upstream commit, reading the four CVE issues, running the duplicate-PR checks, executing the cherry-pick and the lint/mypy/typos commands, and drafting this PR body. Every changed line is the upstream maintainer's; I (Demian Havdun) reviewed the diff and signed off as committer per DCO. Co-author trailer added per AGENTS.md.

Changed files

  • vllm/model_executor/models/registry.py (modified, +2/-0)
  • vllm/transformers_utils/dynamic_module.py (modified, +12/-1)
RAW_BUFFERClick to expand / collapse

CVE-2026-22807 patch 78d13ea9 doesn't look to be present on releases/v0.11.2:

  • vllm/transformers_utils/dynamic_module.py is missing the resolve_trust_remote_code import and the new trust_remote_code parameter on try_get_class_from_dynamic_module().
  • Both call sites in vllm/model_executor/models/registry.py::_try_resolve_transformers (the warn_on_fail=False and warn_on_fail=True arms) still call into the dynamic-module helper without forwarding model_config.trust_remote_code.

Net effect: a transformers-backend model that ships a *.py definition can be loaded via get_class_from_dynamic_module without honoring --trust-remote-code, which is the exact path the CVE writeup flags. Happy to draft a backport PR if releases/v0.11.2 is in the support window.

Cheers, vulgraph

extent analysis

TL;DR

The releases/v0.11.2 branch is missing the CVE-2026-22807 patch, which is necessary to honor the --trust-remote-code flag when loading transformers-backend models.

Guidance

  • Verify that the releases/v0.11.2 branch indeed lacks the patch by checking the dynamic_module.py and registry.py files for the resolve_trust_remote_code import and trust_remote_code parameter.
  • Check the call sites in registry.py to confirm that they do not forward the model_config.trust_remote_code parameter to the dynamic-module helper.
  • Consider backporting the patch to the releases/v0.11.2 branch if it is within the support window.
  • Review the CVE-2026-22807 writeup to understand the security implications of not having this patch.

Notes

The issue seems to be specific to the releases/v0.11.2 branch, and the fix is already available in the main branch (as indicated by the commit hash 78d13ea9). The backport PR should include the necessary changes to dynamic_module.py and registry.py.

Recommendation

Apply workaround: Backport the CVE-2026-22807 patch to the releases/v0.11.2 branch to ensure that the --trust-remote-code flag is honored when loading transformers-backend models.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

vllm - ✅(Solved) Fix Backport CVE-2026-22807 (transformers-backend trust_remote_code) to releases/v0.11.2? [1 pull requests, 1 participants]