vllm - ✅(Solved) Fix releases/v0.11.1: CVE-2026-22807 trust_remote_code gate missing in transformers backend [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#41271Fetched 2026-04-30 06:19:14
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

Fixed

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

vllm/transformers_utils/dynamic_module.py:13 defines try_get_class_from_dynamic_module() without a trust_remote_code parameter on releases/v0.11.1 (sha not yet bumped to 78d13ea9). The upstream CVE-2026-22807 fix 78d13ea9 — "[Model] Handle trust_remote_code for transformers backend (#32194)" — adds an explicit resolve_trust_remote_code(...) gate before get_class_from_dynamic_module(...) so that loading a custom HuggingFace *.py is no longer accepted unconditionally; it also threads model_config.trust_remote_code through both call sites in _try_resolve_transformers (vllm/model_executor/models/registry.py:887 and :899). Both call sites still pass without the kwarg on this branch, and the resolve_trust_remote_code import is missing in the dynamic-module helper. If releases/v0.11.1 is still on the security-fix list I am happy to send a clean cherry-pick.

extent analysis

TL;DR

Apply the security fix from commit 78d13ea9 to address the CVE-2026-22807 vulnerability by adding the trust_remote_code parameter and resolve_trust_remote_code gate.

Guidance

  • Review the changes in commit 78d13ea9 to understand the security fix and its implications.
  • Update the try_get_class_from_dynamic_module() function in dynamic_module.py to include the trust_remote_code parameter.
  • Ensure the resolve_trust_remote_code function is properly imported and used in the dynamic-module helper.
  • Verify that the model_config.trust_remote_code value is correctly threaded through both call sites in _try_resolve_transformers.

Example

No code snippet is provided due to the specific nature of the issue, but the fix should involve modifying the try_get_class_from_dynamic_module() function to match the changes in commit 78d13ea9.

Notes

The fix is specific to addressing the CVE-2026-22807 vulnerability and may not apply to other versions or branches.

Recommendation

Apply the workaround by cherry-picking the commit 78d13ea9 to include the security fix, as it directly addresses the identified vulnerability.

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 releases/v0.11.1: CVE-2026-22807 trust_remote_code gate missing in transformers backend [1 pull requests, 1 participants]