← Back to CVE Explorer

CVE-2026-44827

Full vulnerability record from the local CVENow database.

Description

Diffusers is the a library for pretrained diffusion models. Prior to 0.38.0, diffusers 0.37.0 allows remote code execution without the trust_remote_code=True safeguard when loading pipelines from Hugging Face Hub repositories. The _resolve_custom_pipeline_and_cls function in pipeline_loading_utils.py performs string interpolation on the custom_pipeline parameter using f"{custom_pipeline}.py". When custom_pipeline is not supplied by the user, it defaults to None, which Python interpolates as the literal string "None.py". If an attacker publishes a Hub repository containing a file named None.py with a class that subclasses DiffusionPipeline, the file is automatically downloaded and executed during a standard DiffusionPipeline.from_pretrained() call with no additional keyword arguments. The trust_remote_code check in DiffusionPipeline.download() is bypassed because it evaluates custom_pipeline is not None as False (since the kwarg was never supplied), while the downstream code path that actually loads the module resolves the None value into a valid filename. An attacker can achieve silent arbitrary code execution by publishing a malicious model repository with a None.py file and a standard-looking model_index.json that references a legitimate pipeline class name, requiring only that a victim calls from_pretrained on the repository. This vulnerability is fixed in 0.38.0.

Severity
HIGH
CVSS score
8.8 (v3.1)
Vulnerability status
Analyzed
Source identifier
Published
2026-05-14 17:16:23.500000
Last modified
2026-10-26 14:10:00.130000
View original CVE JSON
{
  "id": "CVE-2026-44827",
  "sourceIdentifier": "[email protected]",
  "published": "2026-05-14T17:16:23.500",
  "lastModified": "2026-10-26T14:10:00.130",
  "vulnStatus": "Analyzed",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "Diffusers is the a library for  pretrained diffusion models. Prior to 0.38.0, diffusers 0.37.0 allows remote code execution without the trust_remote_code=True safeguard when loading pipelines from Hugging Face Hub repositories. The _resolve_custom_pipeline_and_cls function in pipeline_loading_utils.py performs string interpolation on the custom_pipeline parameter using f\"{custom_pipeline}.py\". When custom_pipeline is not supplied by the user, it defaults to None, which Python interpolates as the literal string \"None.py\". If an attacker publishes a Hub repository containing a file named None.py with a class that subclasses DiffusionPipeline, the file is automatically downloaded and executed during a standard DiffusionPipeline.from_pretrained() call with no additional keyword arguments. The trust_remote_code check in DiffusionPipeline.download() is bypassed because it evaluates custom_pipeline is not None as False (since the kwarg was never supplied), while the downstream code path that actually loads the module resolves the None value into a valid filename. An attacker can achieve silent arbitrary code execution by publishing a malicious model repository with a None.py file and a standard-looking model_index.json that references a legitimate pipeline class name, requiring only that a victim calls from_pretrained on the repository. This vulnerability is fixed in 0.38.0."
    },
    {
      "lang": "es",
      "value": "Diffusers es la biblioteca para modelos de difusión preentrenados. Antes de la versión 0.38.0, diffusers 0.37.0 permite la ejecución remota de código sin la salvaguarda trust_remote_code=True al cargar pipelines desde repositorios de Hugging Face Hub. La función _resolve_custom_pipeline_and_cls en pipeline_loading_utils.py realiza interpolación de cadenas en el parámetro custom_pipeline usando f’{custom_pipeline}.py’. Cuando custom_pipeline no es proporcionado por el usuario, su valor predeterminado es None, que Python interpola como la cadena literal ’None.py’. Si un atacante publica un repositorio de Hub que contiene un archivo llamado None.py con una clase que hereda de DiffusionPipeline, el archivo se descarga y ejecuta automáticamente durante una llamada estándar a DiffusionPipeline.from_pretrained() sin argumentos de palabra clave adicionales. La verificación trust_remote_code en DiffusionPipeline.download() se omite porque evalúa custom_pipeline is not None como False (ya que el argumento de palabra clave nunca fue proporcionado), mientras que la ruta de código posterior que realmente carga el módulo resuelve el valor None en un nombre de archivo válido. Un atacante puede lograr la ejecución de código arbitrario silenciosa publicando un repositorio de modelo malicioso con un archivo None.py y un model_index.json de aspecto estándar que referencia un nombre de clase de pipeline legítimo, requiriendo solo que una víctima llame a from_pretrained en el repositorio. Esta vulnerabilidad se corrige en la versión 0.38.0."
    }
  ],
  "affected": [
    {
      "source": "[email protected]",
      "affectedData": [
        {
          "vendor": "huggingface",
          "product": "diffusers",
          "versions": [
            {
              "version": "< 0.38.0",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "[email protected]",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
          "baseScore": 8.8,
          "baseSeverity": "HIGH",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "NONE",
          "userInteraction": "REQUIRED",
          "scope": "UNCHANGED",
          "confidentialityImpact": "HIGH",
          "integrityImpact": "HIGH",
          "availabilityImpact": "HIGH"
        },
        "exploitabilityScore": 2.8,
        "impactScore": 5.9
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-05-14T18:00:53.494731Z",
          "id": "CVE-2026-44827",
          "options": [
            {
              "exploitation": "poc"
            },
            {
              "automatable": "no"
            },
            {
              "technicalImpact": "total"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "[email protected]",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-94"
        }
      ]
    }
  ],
  "configurations": [
    {
      "nodes": [
        {
          "operator": "OR",
          "negate": false,
          "cpeMatch": [
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:huggingface:diffusers:*:*:*:*:*:python:*:*",
              "versionEndExcluding": "0.38.0",
              "matchCriteriaId": "D7F2A2AE-D122-46BA-BD64-67DCF4C22677"
            }
          ]
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://github.com/huggingface/diffusers/security/advisories/GHSA-j7w6-vpvq-j3gm",
      "source": "[email protected]",
      "tags": [
        "Exploit",
        "Mitigation",
        "Vendor Advisory"
      ]
    },
    {
      "url": "https://github.com/huggingface/diffusers/security/advisories/GHSA-j7w6-vpvq-j3gm",
      "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
      "tags": [
        "Exploit",
        "Mitigation",
        "Vendor Advisory"
      ]
    }
  ]
}