Skip to content
EventPast event

Hugging Face Transformers unauthorized write of remote code

1 reports1 reporting sourcesLatest report

Start here

AI overview

A GitHub security advisory states that Hugging Face Transformers 4.49.0 through 5.8.1 has a vulnerability: when calling GenerativePreTrainedModel.load_custom_generate(), remote Python module files are fetched and cached before the user confirms trust_remote_code. Attacker-controlled custom_generate/generate.py code is written to the ~/.cache/huggingface cache directory even if the user rejects the trust prompt.

Generated by AI from reports · Updated 4 days ago

Progress timeline

Oct 1
  1. GitHub 安全公告Selected
    Hugging Face Transformers writes custom generated code before trust confirmation

    Hugging Face Transformers 4.49.0 through 5.8.1 has a vulnerability where calling GenerativePreTrainedModel.load_custom_generate() fetches and caches remote Python module files before the user confirms trust_remote_code. Attacker-controlled custom_generate/generate.py code is written to the ~/.cache/huggingface/modules directory even if the user rejects the trust prompt. The execution step is still restricted by the trust check, but the file write is irreversible and persists across sessions, potentially causing unauthorized files persisted on disk, as well as cache conflicts leading to attacker code being executed in subsequent trusted model loads.

Related discussion

No discussion links have been collected for this event yet.

Attention trend

New sources per day

13 days total1 ·Maximum1(Oct 1)·Today0

  • Oct 1New1 sources (1 outlets,0 accounts)
  • Oct 2New0 sources (0 outlets,0 accounts)
  • Oct 3New0 sources (0 outlets,0 accounts)
  • Oct 4New0 sources (0 outlets,0 accounts)
  • Oct 5New0 sources (0 outlets,0 accounts)
  • Oct 6New0 sources (0 outlets,0 accounts)
  • Oct 7New0 sources (0 outlets,0 accounts)
  • Oct 8New0 sources (0 outlets,0 accounts)
  • Oct 9New0 sources (0 outlets,0 accounts)
  • Oct 10New0 sources (0 outlets,0 accounts)
  • Oct 11New0 sources (0 outlets,0 accounts)
  • Oct 12New0 sources (0 outlets,0 accounts)
  • Oct 13New0 sources (0 outlets,0 accounts)

Hourly attention

No comparable trend data