LiveActive security incident?Get immediate response
CVE Record

CVE-2026-5241: Policy Bypass in LightGlue Nested Config Resolution in huggingface/transformers

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.

HighCVSS 8Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

This flaw can let a malicious Hugging Face model run Python code even when the user explicitly disables remote code trust. The business risk is highest where teams evaluate outside models or run automated inference pipelines with access to secrets, credentials, or internal networks.

Executive priority

Treat as high priority for ML platforms that ingest third-party models. The issue bypasses an explicit safety control, so normal user assumptions may be wrong. Prioritize patching and isolation before continuing automated evaluation of untrusted LightGlue models.

Technical view

In huggingface/transformers LightGlue loading, untrusted serialized configuration can override the intended trust_remote_code=False policy. The nested LightGlueConfig path propagates that value into AutoConfig.from_pretrained(), allowing attacker-supplied modules to execute during AutoModel.from_pretrained() initialization.

Likely exposure

Exposure is most likely in API inference servers, research notebooks, CI/CD model tests, and model evaluation workers that load LightGlue models from untrusted or attacker-controlled repositories. Affected version detail is incomplete; the description cites transformers 5.2.0 while the affected list says unspecified.

Exploitation context

The source bundle does not show CISA KEV listing or cited active exploitation. Exploitation requires a victim to load a malicious model repository. CVSS indicates network attack vector, high complexity, no privileges, user interaction required, changed scope, and high confidentiality and integrity impact.

Researcher notes

Key uncertainty is affected version range. The bundle names transformers 5.2.0 but also lists versions as unspecified. Analysis should focus on the LightGlue nested config path, trust_remote_code propagation, and whether downstream distributions carry the referenced patch or errata.

Mitigation direction

  • Apply Hugging Face and downstream vendor updates that include the referenced fix.
  • Use Red Hat errata where Red Hat-packaged transformers is in scope.
  • Avoid loading untrusted LightGlue model repositories in automated environments.
  • Restrict model workers from accessing production secrets or sensitive networks.
  • Check vendor guidance for exact fixed versions and backports.

Validation and detection

  • Inventory systems using huggingface/transformers and LightGlue model loading.
  • Identify code paths calling AutoModel.from_pretrained() on external model repositories.
  • Confirm whether installed packages include the referenced Hugging Face commit.
  • Review recent model-worker activity for unexpected Python module execution during initialization.
  • Validate Red Hat advisory applicability for managed or packaged deployments.
Prepared
Confidence
medium
Sources
9

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-829: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

Execution behavior lookup

The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
description · low confidence lookup

Credential and access behavior lookup

The CVE wording references authentication or credential exposure, so valid-account and credential-access review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2026-5241 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
8 (3.0)
Known Exploited
No
Published

Vector: CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

2CVSS vectors
5Timeline events
2ADP providers
8Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: pocAutomatable: noTechnical Impact: total

CVSS vector scores

2 official scores

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
8CVSS 3.0HighCVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N1.65.8@huntr_ai
7.7CVSS 3.1HighCVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N1.35.8redhat-SADP

Vulnerability scoring details

Base CVSS 3.1 score

7.7High
CVSS 3.1 vector shape for CVE-2026-5241Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. ADP timelineredhat-SADP

    Made public.

  3. CVE publishedCVE Program

    The CVE record was published.

  4. ADP timelineredhat-SADP

    Reported to Red Hat.

  5. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CISA-ADPCISA ADP Vulnrichment
other:ssvc
redhat-SADPpython-transformers: python-transformers: Arbitrary code execution due to overridden trust_remote_code setting
other:Red Hat severity ratingcvssV3_1
  • 2026-06-03T15:02:16.132Z: Reported to Red Hat.
  • 2026-06-03T12:33:10.227Z: Made public.

Source materials

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
huggingfacehuggingface/transformersunspecifiedListed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-829 · source CWE mapping

Inclusion of Functionality from Untrusted Control Sphere

Inclusion of Functionality from Untrusted Control Sphere represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.