Security mailing lists by PureSourceCode

CVE-2026-4372

HIGH 7.8CVSS 3.0

HuggingFace transformers vulnerable to remote code execution

A critical remote code execution vulnerability exists in all versions of the HuggingFace transformers library prior to version 5.3.0. The vulnerability allows an attacker to craft a malicious config.json file containing the _attn_implementation_internal field set to an attacker-controlled HuggingFace Hub repository ID. When a victim loads this model using the standard AutoModelForCausalLM.from_pretrained() API, the library downloads and executes arbitrary Python code from the attacker's repository with the victim's full OS privileges. This issue arises due to unfiltered deserialization of configuration attributes, insufficient sanitization of internal fields, and unsandboxed execution of downloaded kernels. The vulnerability bypasses the trust_remote_code security mechanism, is invisible to the victim, and exploits the standard documented usage pattern, making it particularly severe. Users are advised to upgrade to version 5.3.0 or later to mitigate this issue.

Published
24 May 2026
Last modified
10 Sep 2026
Assigned by
security@huntr.dev
NVD status
Analyzed
Weakness
CWE-1066CWE-502
Also known as
GHSA-29pf-2h5f-8g72PYSEC-2026-2289
Sources
NVDJSONOSV GHSA-29pf-2h5f-8g72JSONOSV PYSEC-2026-2289JSON

Scores

SourceScored byVersionScoreVector / decision
NVD security@huntr.dev (Secondary) CVSS 3.0 HIGH 7.8 CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
OSV GitHub CVSS 3.0 HIGH 7.8 CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
OSV PyPA CVSS 3.0 HIGH 7.8 CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD huggingface transformers
cpe:2.3:a:huggingface:transformers:*:*:*:*:*:*:*:*
< 5.3.0 5.3.0
OSV PyPI transformers < 5.3.0 5.3.0

References

History

  • 25 Nov 2026 21:02 UTC · NVD: first stored (published 24 May 2026)
  • 25 Nov 2026 20:12 UTC · OSV: first stored (published 24 May 2026)
  • 25 Nov 2026 20:11 UTC · OSV: first stored (published 26 May 2026)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.