CVE-2026-5241
Description
A flaw was found in python-transformers. An attacker can exploit this vulnerability by providing a malicious model repository. During model initialization, the trust_remote_code parameter, intended to prevent remote code execution, is overridden by untrusted configuration data. This allows the attacker to execute arbitrary code, potentially leading to credential theft, unauthorized access, or the deployment of backdoors.
Statement
This Important vulnerability in python-transformers allows for arbitrary code execution when loading a malicious LightGlue model, even if trust_remote_code is explicitly set to False. This occurs because untrusted serialized configuration data can override the security setting in nested model loading paths. Red Hat products utilizing python-transformers for AI/ML workloads, such as Red Hat AI Inference Server and Red Hat OpenShift AI, are affected, posing a significant risk of credential theft or system compromise if untrusted models are processed. The LightGlue model (and its vulnerable trust_remote_code handling) was introduced in transformers 4.53.0 and fixed in 5.5.0; the CNA-published affected range is all versions before 5.5.0.
Mitigation
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
Common Vulnerability Scoring System (CVSS) Score Details
Info alert:Important note
CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).
CVSS v3 Score Breakdown
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 7.7 | 9.6 | 7.7 |
| Attack Vector | Network | Network | Network |
| Attack Complexity | High | Low | High |
| Privileges Required | Low | None | Low |
| User Interaction | Required | Required | Required |
| Scope | Changed | Changed | Changed |
| Confidentiality | High | High | High |
| Integrity Impact | High | High | High |
| Availability Impact | None | High | None |
Vector
Red Hat: CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N
NVD: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
cve.org: CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N
Understanding the Weakness (CWE)
Confidentiality,Integrity,Availability
Technical Impact: Execute Unauthorized Code or Commands
An attacker could insert malicious functionality into the program by causing the program to download code that the attacker has placed into the untrusted control sphere, such as a malicious web site. This could enable the injection of malware, information exposure by granting excessive privileges or permissions to the untrusted functionality, DOM-based XSS vulnerabilities, stealing user's cookies, open redirect to malware (CWE-601), etc.
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.