VAITP Dataset

← Back to the dataset

CVE-2026-76843

Arbitrary code execution via pickle load in Flair's clustering model loader.

  • CVSS 8.4
  • CWE-502
  • Input Validation and Sanitization
  • Remote

The official Flair wheels for 0.15.0 and 0.15.1 still contain flair/models/clustering.py, whose ClusteringModel.load static method returns pickle.loads(joblib.load(str(model_file))) and so executes arbitrary Python while loading a model file. Loading a model supplied by an attacker therefore runs that attacker's code with the privileges of the loading process. This is the same sink and the same file as CVE-2024-10073, which records 0.15.0 as the fixed version on the basis that clustering support was dropped in that release; the module was removed from the documented API but remains present in the distributed artifact and reachable by importing flair.models.clustering directly, so the earlier record's fixed version does not hold for the shipped package.

CVSS base score
8.4
Published
2026-08-24
OWASP
A08 Software and Data Integrity Failures
Orthogonal defect classification
Checking
Code defect classification
Missing Check
Category
Input Validation and Sanitization
Subcategory
Insecure Parsing or Deserialization
Accessibility scope
Remote
Impact
Arbitrary Code Execution
Affected component
flair
Fixed by upgrading
Yes

Solution

Upgrade to Flair 0.16.0 (or any newer release).

Vulnerable code sample

import joblib
import pickle
from pathlib import Path

class ClusteringModel:
    @staticmethod
    def load(model_file: Path):
        # VULNERABLE: unsafe deserialization via pickle.loads on untrusted data
        return pickle.loads(joblib.load(str(model_file)))

Patched code sample

import joblib
from pathlib import Path

class ClusteringModel:
    @staticmethod
    def load(model_file: Path):
        # FIX: load model directly with joblib, avoiding pickle.loads
        return joblib.load(str(model_file))

Cite this entry

@misc{vaitp:cve202676843,
  title        = {{Arbitrary code execution via pickle load in Flair's clustering model loader.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-76843},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-76843/}}
}

Download this entry as JSON Download the whole dataset

Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::

Before you use the VAITP AI models

Please read and accept the following disclaimer:

By choosing "I understand and accept", you acknowledge that you understand and agree to these terms.