transformers is vulnerable to Path Traversal
71
High Risk
The save_pretrained methods of the base tokenizer and processor classes use dictionary keys from chat-template data as output filenames without validation. A model repository can supply crafted keys containing path traversal sequences in tokenizer_config.json. Saving a tokenizer or processor loaded from such a repository then writes attacker-controlled files outside the intended directory. The fix validates and sanitizes the keys before using them as filenames.
You are affected if you are using a version that falls within the vulnerable range and you save tokenizers or processors loaded from untrusted model repositories.
transformers is vulnerable to Path Traversal in versions 4.52.0 - 5.9.0.
Upgrade the transformers library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant