# Hugging Face releases Transformers v5.22.2 with security fixes

> The patch release hardens Jinja sandboxing and adjusts device selection for distributed runs using NCCL.

Oossa · 2026-11-06 · https://oossa.com/en/hugging-face-releases-transformers-v5-22-2-with-security-fixes

Hugging Face released Transformers v5.22.2, a patch update focused on security and distributed-computing fixes. One change hardens the library’s Jinja sandbox, which helps limit what templated code can do. Another sets `device_id` only when using NCCL, a tool for communication between GPUs. The release notes link to the full list of changes from v5.22.1.

## The facts

- The release is Transformers v5.22.2.
- The listed fixes cover Jinja sandboxing and NCCL device selection.

## Why it matters

People using Transformers may benefit from stronger template safeguards and a targeted fix for NCCL-based distributed runs; the release notes do not specify further security details or affected versions.

## Sources & references

1. [huggingface/transformers Patch release v5.22.2](https://github.com/huggingface/transformers/releases/tag/v5.22.2) – Transformers, 2026-11-06

Last updated: 2026-11-06
