Skip to the content
AI and Cybersecurity Learning and Practice Center Test automation Open the Learning Center

WeaknessASC-2026-0061Other weakness

Remote code in model repositories (trust_remote_code)

MediumMitigated

Loading some models runs Python code from the model repository, through trust_remote_code or config auto_map entries, giving the repository's author code execution.

How to detect it

  • trust_remote_code=True in loading code
  • Model configs with auto_map pointing to custom code (vLLM CVE-2025-66448)

How to resolve it

  • Keep trust_remote_code off; use models supported natively
  • Pin and review any remote code you must run
  • Update inference servers that executed it implicitly

How to investigate

  1. Find loads with remote code enabled and the code they ran
  2. Scan the hosts for persistence

Sources

Open it in the Learning Center's vulnerability database