CVE-2026-6859: InstructLab arbitrary code execution via hardcoded trust_remote_code

CVE-2026-6859 · Severity: high · CVSS 8.8 · Published 2026-04-22

InstructLab, a tool used for training and interacting with large language models, contains a security flaw that could allow an attacker to take over a user's system. By tricking a user into downloading or training a malicious model from the HuggingFace Hub, an attacker can execute unauthorized commands on the victim's computer. This could lead to the theft of sensitive data or a complete compromise of the affected machine.

Vendors: PyPI, Redhat.

Quick answers

Is CVE-2026-6859 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-6859 being exploited in the wild.
How severe is CVE-2026-6859?
High severity, with a CVSS score of 8.8, published 22 April 2026.
Which products and versions are affected?
instructlab (PyPI) ECOSYSTEM:introduced=0,last_affected=0.26.1.
Is there a fix for CVE-2026-6859?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2026-6859 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-6859?
Check whether you run instructlab (PyPI), Redhat Enterprise Linux Ai or Redhat Instructlab at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

A vulnerability exists in InstructLab's `linux_train.py` script where the `trust_remote_code=True` parameter is hardcoded during HuggingFace `from_pretrained()` calls. This bypasses security protections that normally prevent the execution of arbitrary code embedded within model files. A remote attacker can exploit this by hosting a malicious model on the HuggingFace Hub and convincing a user to interact with it using `ilab` commands (train, download, or generate). Successful exploitation results in arbitrary Python code execution with the privileges of the user running the script, potentially leading to full system compromise.

Affected products

  • Red Hat InstructLab -
  • Red Hat Red Hat Enterprise Linux AI (RHEL AI) 3 3.0

Identifiers

  • CVE-2026-6859
  • GHSA-rxpq-xgqx-fr7p
  • PYSEC-2026-2522

Timeline

  • 2026-04-15: advisory: Initial release date of the VEX document
  • 2026-04-22: disclosed: NVD publication date

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.