CVE-2024-10073: Flair Flair Allows Arbitrary Code Execution Vulnerability

MODERATE
Advisory Identifier: GHSA-9rw2-jf8x-cgwm
CVSS 5.0
CWE-94
Published
Advisory Summary

CVE-2024-10073 is a MODERATE (CVSS 5.0) flair allows arbitrary code execution vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Flair libraries in the PyPI ecosystem. The issue involves flair allows arbitrary code execution. Remediation is available by upgrading affected packages to version 0.15.0.

CVE-2024-10073 at a Glance

CVE Identifier CVE-2024-10073
GHSA Identifier GHSA-9rw2-jf8x-cgwm
Severity MODERATE
CVSS v3.1 Base Score 5.0
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Flair
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.0

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2024-10073

To remediate this vulnerability, upgrade all affected Flair dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

flair fixed: 0.15.0
pip install flair>=0.15.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show flair

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2024-10073, inspect your installed packages using pip:

pip show flair

Analyze the terminal output to locate any version of Flair in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.15.0), your application is affected.

Note: The pip show flair command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Flair, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

A vulnerability, which was classified as critical, was found in flairNLP flair 0.14.0. Affected is the function ClusteringModel of the file flair\models\clustering.py of the component Mode File Loader. The manipulation leads to code injection. It is possible to launch the attack remotely. The complexity of an attack is rather high. The exploitability is told to be difficult. The exploit has been disclosed to the public and may be used. The vendor was contacted early about this disclosure but did not respond in any way.

CVE-2024-10073 Affected Flair Versions

1 component(s)
Fixed Versions:
0.15.0
Product / Package Ecosystem Affected Versions Fixed Version
flair
PyPI
< 0.15.0
0.15.0

References

Frequently Asked Questions

What is CVE-2024-10073?
CVE-2024-10073 is a security vulnerability in Flair involving Flair allows arbitrary code execution under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Flair versions are affected?
Affected versions include releases prior to 0.15.0 across affected packages: flair.
What version fixes CVE-2024-10073?
Upgrading to 0.15.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is flair affected?
Yes, flair is affected in releases prior to 0.15.0. Upgrade your dependency to 0.15.0 or later.
What is the CVSS score of CVE-2024-10073?
CVE-2024-10073 has a CVSS v3.1 base score of 5.0 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2024-10073?
CVE-2024-10073 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check PyPI dependencies for CVE-2024-10073?
Run the dependency tree command: 'pip show flair'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-9rw2-jf8x-cgwm",
  "modified" : "2025-05-02T14:40:27Z",
  "published" : "2024-10-17T18:31:36Z",
  "aliases" : [ "CVE-2024-10073" ],
  "summary" : "Flair allows arbitrary code execution",
  "details" : "A vulnerability, which was classified as critical, was found in flairNLP flair 0.14.0. Affected is the function ClusteringModel of the file flair\\models\\clustering.py of the component Mode File Loader. The manipulation leads to code injection. It is possible to launch the attack remotely. The complexity of an attack is rather high. The exploitability is told to be difficult. The exploit has been disclosed to the public and may be used. The vendor was contacted early about this disclosure but did not respond in any way.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "flair"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.15.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-10073"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/flairNLP/flair/commit/fb27c7eb1d92855c27db820a108b17883a5d6fc1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bayuncao/vul-cve-20"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bayuncao/vul-cve-20/blob/main/PoC.py"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/flairNLP/flair"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/flairNLP/flair/releases/tag/v0.15.0"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?ctiid.280722"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?id.280722"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?submit.420055"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-10-24T16:45:49Z",
    "nvd_published_at" : "2024-10-17T17:15:11Z"
  }
}