Skip to main content
Vulnerability Database/CVE-2026-112075

CVE-2026-112075: Unsloth Library RCE Vulnerability

CVE-2026-112075 is a remote code execution vulnerability in unslothai unsloth library affecting versions up to 0.1.501-beta. This flaw allows attackers to execute arbitrary code remotely. This article covers technical details, affected versions, impact assessment, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-112075 Overview

CVE-2026-112075 is an unsafe reflection vulnerability [CWE-470] in the unslothai/unsloth machine learning library. The flaw resides in the FastSentenceTransformer._is_transformer_module_ref function within unsloth/models/sentence_transformer.py. An attacker can manipulate the Type argument to supply externally-controlled input used to select classes or code paths at runtime. The attack is remotely initiated and requires user interaction. A public exploit has been disclosed, and the maintainers published a patch in version 0.1.902-beta (commit de801746386a53a0cb26216e715a0af863b76ad9).

Critical Impact

Remote attackers can influence class resolution in unsloth, enabling unintended code paths to execute within machine learning pipelines that process attacker-supplied input.

Affected Products

  • unslothai/unsloth versions up to and including 0.1.501-beta
  • Component: unsloth/models/sentence_transformer.py
  • Function: FastSentenceTransformer._is_transformer_module_ref

Discovery Timeline

  • 2026-10-19 - CVE-2026-112075 published to NVD
  • 2026-10-19 - Last updated in NVD database

Technical Details for CVE-2026-112075

Vulnerability Analysis

The vulnerability is classified as Unsafe Reflection [CWE-470]. It occurs when an application uses externally-controlled input to select the class or code that will be loaded or executed. In FastSentenceTransformer._is_transformer_module_ref, the Type argument is accepted from caller-controlled data and used in a reflective class resolution path.

Because unsloth is widely used for fine-tuning large language models and often processes externally sourced configuration, an attacker who can influence the Type value can steer execution toward unintended classes. This creates a weakness in machine learning pipelines where model loading, serialization helpers, or auxiliary modules trust configuration supplied over a network.

According to the vulnerability record, exploitation requires user interaction and operates over a network. The impact spans confidentiality, integrity, and availability at a limited scope within the affected process.

Root Cause

The root cause is the use of an externally-controlled string to resolve a Python class reference without validating that the resulting type belongs to an allow-list of safe modules. The pre-patch code path trusted caller-supplied Type input during sentence-transformer module reference checks. The fix in commit de801746386a53a0cb26216e715a0af863b76ad9 incorporates additional import fixes (fix_transformers_validate_rope_ignore_keys, fix_transformers_is_torch_fx_available) and hardens the module reference logic.

Attack Vector

The attack vector is network-based and requires passive user interaction, such as loading a crafted model or configuration. An attacker publishes a tampered artifact that triggers _is_transformer_module_ref with an adversarial Type value. When a victim loads the artifact in an unsloth-based workflow, the reflective lookup selects attacker-chosen code. A public proof of concept is distributed as a ZIP archive referenced from the vulnerability database entry.

python
# Patch excerpt from unsloth/__init__.py
# Source: https://github.com/unslothai/unsloth/commit/de801746386a53a0cb26216e715a0af863b76ad9
    try:
        from .import_fixes import fix_transformers_validate_rope_ignore_keys as _fix_validate_rope
        _fix_validate_rope()
        del _fix_validate_rope
    except Exception:
        pass
    try:
        from .import_fixes import fix_transformers_is_torch_fx_available as _fix_torch_fx
        _fix_torch_fx()
        del _fix_torch_fx
    except Exception:
        pass

The patch also registers the new fix in unsloth/_gpu_init.py:

python
# Source: https://github.com/unslothai/unsloth/commit/de801746386a53a0cb26216e715a0af863b76ad9
    fix_transformers_composite_prefix_renaming,
    fix_transformers_fully_masked_rows,
    fix_transformers_rope_scaling_drops_theta,
    fix_transformers_validate_rope_ignore_keys,
    fix_transformers_remote_rope_scaling_none,
    fix_transformers_is_torch_fx_available,
    fix_xformers_performance_issue,

Stop Remote Code Execution Before It Runs

Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.

Stop Exploit Attempts

Detection Methods for CVE-2026-112075

Indicators of Compromise

  • Python processes importing unsloth.models.sentence_transformer while loading remotely sourced model configurations.
  • Unexpected child processes spawned by Python interpreters that previously called FastSentenceTransformer.
  • Presence of the public proof-of-concept archive poc.zip referenced on the vulnerability database entry.
  • Outbound network connections to untrusted hosts initiated during model loading operations.

Detection Strategies

  • Inventory Python environments and identify installations of unslothai/unsloth at or below version 0.1.501-beta.
  • Audit model artifacts for configuration fields that populate the Type argument passed to _is_transformer_module_ref.
  • Review training and inference logs for exceptions originating from reflective class loading in sentence_transformer.py.

Monitoring Recommendations

  • Monitor data science hosts for anomalous process trees descending from Jupyter, MLflow, or Airflow workers running unsloth.
  • Alert on new Python modules being imported dynamically during model deserialization.
  • Track outbound traffic from training nodes to non-approved model registries or raw file hosts.

How to Mitigate CVE-2026-112075

Immediate Actions Required

  • Upgrade unslothai/unsloth to version 0.1.902-beta or later, which contains commit de801746386a53a0cb26216e715a0af863b76ad9.
  • Restrict ingestion of third-party models and sentence-transformer configurations to vetted internal registries.
  • Rebuild container images and virtual environments that pinned a vulnerable unsloth release.

Patch Information

The fix is distributed in the GitHub Release v0.1.902-beta and merged through GitHub Pull Request #11560. The underlying issue is tracked in GitHub Issue #12419, and additional context is available in the VulDB CVE-2026-112075 record.

Workarounds

  • Pin workloads to trusted model artifacts and reject configurations containing unexpected Type values.
  • Run unsloth workloads in sandboxed containers with no outbound network access to limit secondary impact.
  • Enforce code review on any wrapper code that forwards user-controlled fields into FastSentenceTransformer constructors.
bash
# Upgrade unsloth to the patched release
pip install --upgrade "unsloth>=0.1.902b0"

# Verify the installed version
python -c "import unsloth; print(unsloth.__version__)"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.