CVE-2026-6859 Instructlab: instructlab: arbitrary code execution due to hardcoded `trust_remote_code=true`

High 8.8 Published Updated

Attackers can execute arbitrary code by tricking users into loading malicious models due to hardcoded trust_remote_code setting in InstructLab.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2026-6859?

CVE-2026-6859 is a high-severity code injection vulnerability in Red Hat Enterprise Linux AI (RHEL AI) 3, published on 22 Apr 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

A flaw was found in InstructLab. The `linux_train.py` script hardcodes `trust_remote_code=True` when loading models from HuggingFace. This allows a remote attacker to achieve arbitrary Python code execution by convincing a user to run `ilab train/download/generate` with a specially crafted malicious model from the HuggingFace Hub. This vulnerability can lead to complete system compromise.

Weakness: CWE-829

Which versions are affected by CVE-2026-6859?

3 open source packages ship an affected version, including instructlab. It affects 2 products.

PackageAffectedFixed in
instructlab PyPIAll versions to 0.26.1None
instructlab PyPIAll versions to 0.26.1None
instructlab PyPIAll versions to 0.26.1None

Products include Redhat Enterprise Linux Ai, Redhat Instructlab.

How do I fix CVE-2026-6859?

No fix has been published for CVE-2026-6859 yet. Limit exposure of the affected software until one is available.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-6859 being exploited?

There is no known exploitation of CVE-2026-6859 in the wild and no public exploit code.

Sources

Also known as GHSA-rxpq-xgqx-fr7p, PYSEC-2026-2522.

Is CVE-2026-6859 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free