CVE-2026-6859 Instructlab: instructlab: arbitrary code execution due to hardcoded `trust_remote_code=true`
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.
| Package | Affected | Fixed in |
|---|---|---|
instructlab PyPI | All versions to 0.26.1 | None |
instructlab PyPI | All versions to 0.26.1 | None |
instructlab PyPI | All versions to 0.26.1 | None |
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.
Other vulnerabilities in Red Hat Enterprise Linux AI (RHEL AI) 3
Sources
Also known as GHSA-rxpq-xgqx-fr7p, PYSEC-2026-2522.