CVE-2024-10073: Flair Flair Allows Arbitrary Code Execution Vulnerability
MODERATECVE-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
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).
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.
pip install flair>=0.15.0
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
CVE-2024-10073 Affected Flair Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
flair
|
PyPI |
< 0.15.0
|
0.15.0
|
References
Frequently Asked Questions
What is CVE-2024-10073?
Which Flair versions are affected?
What version fixes CVE-2024-10073?
Is flair affected?
What is the CVSS score of CVE-2024-10073?
What CWE is associated with CVE-2024-10073?
How can I check PyPI dependencies for CVE-2024-10073?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}