
CVE catalog
CVE-2026-80047
A vulnerability in Hugging Face Transformers (versions…
A flaw was found in the Hugging Face Transformers library. A remote attacker could exploit this vulnerability by enticing a user to load a model using the GenerativePreTrainedModel.load_custom_generate() function. This function writes remote Python files to the local disk without requiring explicit user consent, bypassing intended security checks. This can result in unauthorized files persisting on the system and potentially lead to the execution of previously cached malicious code during subsequent trusted model loads. transformers: Hugging Face Transformers: Unauthorized file write via GenerativePreTrainedModel.load_custom_generate() Red Hat Product Security has determined that this issue affects Red Hat OpenShift AI, Red Hat Enterprise Linux AI, Ansible Automation Platform Lightspeed, and OpenShift Lightspeed products that bundle the Hugging Face Transformers library (versions 4.49.0 through 5.8.1). The vulnerability allows remote Python files to be written to the user's local cache without consent when using the GenerativePreTrainedModel.load_custom_generate() function. While code execution is correctly gated behind trust verification, the unauthorized file write can result in persistent malicious files that may later be executed during subsequent trusted model loads via cache collisions. The impact is limited to scenarios where users load models from attacker-controlled repositories. The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
- Severity
- High · CVSS 7.8
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Published
- Updated
- Source
- [NVD] · [CVE record]
- EPSS
- 0.10% · Oct 27, 2026
Reported versions and fixes
Each observation applies to its named package, distribution, and release. Distribution backports can fix a vulnerability while retaining an older upstream version number.
Version impact has not been established. The original provider fields are retained below.
Provider details and historical evidence
Original provider fields
{
"package_releases": [],
"fixed_versions": [],
"distribution_packages": [
{
"name": "transformers",
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "4.49.0"
},
{
"last_affected": "5.8.1"
}
]
}
],
"ecosystem": "PyPI",
"fixed_version": "",
"provider_record_id": "PYSEC-2026-4174"
},
{
"name": "transformers",
"ecosystem": "pip",
"fixed_version": "",
"provider_record_id": "GHSA-X9R9-C232-4Q39"
}
]
}OpenFactory catalog packages
Matching against OpenFactory catalog package versions is in progress.
Observed:
References
- [https://github.com/advisories/GHSA-x9r9-c232-4q39]
- [https://nvd.nist.gov/vuln/detail/CVE-2026-80047]
- [https://osv.dev/vulnerability/PYSEC-2026-4174]
- [https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-80047.json]
[FIRST EPSS] · [GitHub Advisory Database] · [National Vulnerability Database (NVD)] · [OSV Package Vulnerability Database] · [Red Hat security advisories and VEX]