CVE-2022-0315: Horovod Use Of Insecure Temporary File Vulnerability
HIGHCVE-2022-0315 is a HIGH (CVSS 8.2) use of insecure temporary file vulnerability (CWE-668: Exposure of Resource to Wrong Sphere) affecting Horovod libraries in the PyPI ecosystem. The issue involves use of insecure temporary file in horovod. Remediation is available by upgrading affected packages to version 0.24.0.
CVE-2022-0315 at a Glance
Security Impact
CVSS: 8.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H).
How to Fix CVE-2022-0315
To remediate this vulnerability, upgrade all affected Horovod 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 horovod>=0.24.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show horovod
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2022-0315, inspect your installed packages using pip:
pip show horovod
Analyze the terminal output to locate any version of Horovod in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.24.0), your application is affected.
Note: The pip show horovod command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-668: Exposure of Resource to Wrong Sphere, where the product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource. In Horovod, 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-2022-0315 Affected Horovod Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
horovod
|
PyPI |
< 0.24.0
|
0.24.0
|
References
Frequently Asked Questions
What is CVE-2022-0315?
Which Horovod versions are affected?
What version fixes CVE-2022-0315?
Is horovod affected?
What is the CVSS score of CVE-2022-0315?
What CWE is associated with CVE-2022-0315?
How can I check PyPI dependencies for CVE-2022-0315?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-47wv-vhj2-g66m",
"modified" : "2024-09-20T21:30:25Z",
"published" : "2022-03-29T19:18:32Z",
"aliases" : [ "CVE-2022-0315" ],
"summary" : "Use of insecure temporary file in Horovod",
"details" : "### Impact\nThe insecure `tempfile.mktemp()` is used when Horovod is run in an LSF job with `jsrun`. In that situation, a jsrun rank file is created with `mktemp`, which could be hijacked by another process to read or manipulate the content.\n\nThis issue does not impact the use of MPI, Gloo, Spark or Ray.\n\n### Patches\nThe problem has been fixed in [b96ecae4](https://github.com/horovod/horovod/commit/b96ecae4dc69fc0a83c7c2d3f1dde600c20a1b41).\n\n### Workarounds\nThe rank file is not created when `binding_args` are provided in the `Settings` instance.\n\n### References\nPlease see https://github.com/horovod/horovod/pull/3358 for details.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [https://github.com/horovod/horovod](https://github.com/horovod/horovod/issues/new/choose)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "horovod"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.24.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/horovod/horovod/security/advisories/GHSA-47wv-vhj2-g66m"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-0315"
}, {
"type" : "WEB",
"url" : "https://github.com/horovod/horovod/pull/3358"
}, {
"type" : "WEB",
"url" : "https://github.com/horovod/horovod/commit/b96ecae4dc69fc0a83c7c2d3f1dde600c20a1b41"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-47wv-vhj2-g66m"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/horovod/horovod"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/horovod/PYSEC-2022-175.yaml"
}, {
"type" : "WEB",
"url" : "https://huntr.dev/bounties/7e50397b-dd63-4bb5-b56d-704094a7da45"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-377", "CWE-668" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-03-29T19:18:32Z",
"nvd_published_at" : "2022-03-24T09:15:00Z"
}
}