# CVE-2026-6859: Instructlab: instructlab: arbitrary code execution due to hardcoded \`trust\_remote\_code=true\`

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.8
- **CVSS:** 8.8 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: Required; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.80% (percentile 53, 2026-11-26)
- **CWE:** CWE-829
- **Aliases:** GHSA-rxpq-xgqx-fr7p, PYSEC-2026-2522
- **Published:** 2026-04-22T13:04:04.795Z
- **Modified:** 2026-10-26T21:10:00.170Z

## Who should check

- Projects that depend on PyPI package instructlab (\<= 0.26.1)
- Anyone running Red Hat Enterprise Linux AI (RHEL AI) 3 all versions
- Anyone running Red Hat Enterprise Linux AI (RHEL AI) 3 (versions: see the vendor advisory)

## 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.

## Affected and fixed versions

- PyPI `instructlab`: affected \<= 0.26.1; fixed no fix listed yet (osv)
- Red Hat Enterprise Linux AI (RHEL AI) 3: all versions (cvelist)
- Red Hat Enterprise Linux AI (RHEL AI) 3: all versions (cvelist)
- Red Hat Enterprise Linux AI (RHEL AI) 3: see vendor advisory (cvelist)
- Red Hat Enterprise Linux AI (RHEL AI) 3: all versions (cvelist)
- Red Hat Enterprise Linux AI (RHEL AI) 3: all versions (cvelist)
- Red Hat Enterprise Linux AI (RHEL AI) 3: see vendor advisory (cvelist)

## Mitigation

- Vendor workaround: To mitigate this issue, only use models from trusted sources when performing \`instructlab\` operations. Review the origin and integrity of any HuggingFace model before using it with \`ilab train/download/generate\`. Consider running \`instructlab\` commands within a sandboxed or isolated environment to limit the potential impact of executing untrusted code.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-6859. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-6859.md
Affected: instructlab <= 0.26.1
Fixed in: no fixed version listed yet

Steps:
1. Search this machine and project for instructlab (PyPI), Red Hat Enterprise Linux AI (RHEL AI) 3: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-6859 being exploited?

There is no confirmed exploitation: CVE-2026-6859 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.80% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-6859?

High: CVSS 8.8 (v3.1, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2026-6859?

instructlab \<= 0.26.1.

### Is there a fix for CVE-2026-6859?

No fixed version is listed in the sources yet. Vendor workaround: To mitigate this issue, only use models from trusted sources when performing \`instructlab\` operations. Review the origin and integrity of any HuggingFace model before using it with \`ilab train/download/generate\`. Consider running \`instructlab\` commands within a sandboxed or isolated environment to limit the potential impact of executing untrusted code.

### How do I check if I'm affected by CVE-2026-6859?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://access.redhat.com/security/cve/CVE-2026-6859>
- vendor: <https://bugzilla.redhat.com/show_bug.cgi?id=2459998>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2026-6859>
- vendor: <https://github.com/advisories/GHSA-rxpq-xgqx-fr7p>
- other: <https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-6859.json>
- other: <https://github.com/instructlab/instructlab>
- other: <https://pypi.org/project/instructlab>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-6859>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-rxpq-xgqx-fr7p> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2026-2522> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-6859> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-6859>
