Skip to main content
Public proof of conceptFix available

CVE-2026-5241

A public proof of concept exists; no exploitation attested.

  • Published2026-06-03
  • Fixed in5.5.0
  • WeaknessCWE-829

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

Description

A vulnerability in the LightGlue model loading path of huggingface/transformers version 5.2.0 allows an attacker-controlled model repository to execute arbitrary code during model initialization. The issue arises because the `trust_remote_code` parameter, intended to prevent remote code execution, is overridden by untrusted serialized configuration data in a nested code path. Specifically, when loading a LightGlue model using `AutoModel.from_pretrained()` with `trust_remote_code=False`, the `LightGlueConfig` reads the `trust_remote_code` value from the untrusted `config.json` file and propagates it into nested `AutoConfig.from_pretrained()` calls. This results in the execution of attacker-provided Python modules, even when the victim explicitly disables remote code execution. The vulnerability poses a high risk for environments such as API inference servers, research notebooks, CI/CD pipelines, and model evaluation workers, potentially leading to credential theft, lateral movement, or persistence/backdoor deployment.

Timeline

dates in UTC
  1. 2026-06-0314:16CVE publishedNVD

Versions per branch

OSV · NVD
transformers
BranchAffectedFixed in
5.5< 5.5.05.5.0
5.2≤ 5.2.0no fix published
Huggingface transformers
BranchAffectedFixed in
5.2= 5.2.0no fix published

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As @huntr_ai, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • huggingface/transformers
    Affected
    • < 5.5.0fixed in 5.5.0custom

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE Terms of UseCVE recordupdated 2026-06-03

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • nemoChainguardall versions · fixed in 2.7.3-r11
  • py3.10-transformers-4.51Chainguardall versions · fixed in 0and 3 other packages
  • py3.10-transformers-4.56Chainguardall versions · no fixed version listedand 3 other packages
  • text-generation-inferenceChainguardall versions · fixed in 3.3.7-r21
  • transformersTuxCare:PyPIfrom 4.57.6.post0 · fixed in 4.57.6.post3+tuxcare
  • transformersEcho:PyPIall versions · fixed in 4.57.3+echo.1

Vendor advisories

  • RHSA-2026:87410 Red Hat Product Security12 products fixed

    Red Hat Security Advisory: RHOAI 2.25.12 - Red Hat OpenShift AI

  • RHSA-2026:84734 Red Hat Product Security20 products fixed

    Red Hat Security Advisory: RHOAI 3.4.5 - Red Hat OpenShift AI

  • RHSA-2026:70996 Red Hat Product Security2 products fixed

    Red Hat Security Advisory: Red Hat AI Inference Model Optimization Tools 3.4.5 (cuda)

  • RHSA-2026:70995 Red Hat Product Security1 product fixed

    Red Hat Security Advisory: Red Hat AI Inference 3.4.5 (rocm)

  • RHSA-2026:70979 Red Hat Product Security2 products fixed

    Red Hat Security Advisory: Red Hat AI Inference 3.4.5 (cuda)

  • RHSA-2026:70969 Red Hat Product Security3 products fixed

    Red Hat Security Advisory: Red Hat AI Inference 3.4.5 (spyre)

10 more advisories

Full record on NVD

Fix

  1. Update transformers to 5.5.0
  2. Vendor fix Red Hat Product Security RHSA-2026:87410 · 12 productsFor Red Hat OpenShift AI 2.25.12 see the following documentation, which will be updated shortly for this release, for important instructions on how to upgrade your cluster and fully apply this errata update: https://docs.redhat.com/en/documentation/red_hat_openshift_ai/
  3. Vendor fix Red Hat Product Security RHSA-2026:84734 · 20 productsFor Red Hat OpenShift AI 3.4.5 see the following documentation, which will be updated shortly for this release, for important instructions on how to upgrade your cluster and fully apply this errata update: https://docs.redhat.com/en/documentation/red_hat_openshift_ai/
  4. Vendor fix Red Hat Product Security RHSA-2026:70996 · 2 productsFor more information visit https://access.redhat.com/errata/RHSA-2026:70996
  5. Vendor fix Red Hat Product Security RHSA-2026:70995 · 1 productFor more information visit https://access.redhat.com/errata/RHSA-2026:70995
  6. Vendor fix Red Hat Product Security RHSA-2026:70979 · 2 productsFor more information visit https://access.redhat.com/errata/RHSA-2026:70979
  7. Vendor fix Red Hat Product Security RHSA-2026:70969 · 3 productsFor more information visit https://access.redhat.com/errata/RHSA-2026:70969

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

  • CISA-ADPSSVC decisionpoc2026-06-03
  • CNACVSS 3.17.7known since 2026-10-23
  • NVDCVSS 3.19.6read 2026-10-23
  • CNACVSS 3.08known since 2026-10-23
  • CNAweakness (CWE)CWE-829known since 2026-10-23
  • FIRST EPSSEPSS score0.6 %2026-11-18
  • OSVaffected packages—
  • GitHub AdvisoriesadvisoryHIGH2026-07-13

Identifiers

Technical details

CVSS v3 Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
Published
2026-06-03
Last Modified
2026-08-28
NVD status
Modified
GitHub Advisory
GHSA-fgcw-684q-jj6r

Frequently asked questions

What is CVE-2026-5241?

A vulnerability in the LightGlue model loading path of huggingface/transformers version 5.2.0 allows an attacker-controlled model repository to execute arbitrary code during model initialization. The issue arises because the `trust_remote_code` parameter, intended to prevent remote code execution, is overridden by untrusted serialized configuration data in a nested code path. Specifically, when loading a LightGlue model using `AutoModel.from_pretrained()` with `trust_remote_code=False`, the `LightGlueConfig` reads the `trust_remote_code` value from the untrusted `config.json` file and propagates it into nested `AutoConfig.from_pretrained()` calls. This results in the execution of attacker-provided Python modules, even when the victim explicitly disables remote code execution. The vulnerability poses a high risk for environments such as API inference servers, research notebooks, CI/CD pipelines, and model evaluation workers, potentially leading to credential theft, lateral movement, or persistence/backdoor deployment.

Is CVE-2026-5241 actively exploited?

A proof-of-concept exploit exists for CVE-2026-5241, but active exploitation has not been confirmed at this time.

What is the CVSS score for CVE-2026-5241?

CVE-2026-5241 has a CVSS v3 base score of 9.6 (CRITICAL severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H.

Running transformers? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month

Sources for this record