CVE-2022-34668: Nvflare NVFLARE Unsafe Deserialization Due To Vulnerability
CRITICALCVE-2022-34668 is a CRITICAL (CVSS 9.8) nvflare unsafe deserialization due to vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Nvflare libraries in the PyPI ecosystem. The issue involves nvflare unsafe deserialization due to pickle. Remediation is available by upgrading affected packages to version 2.1.4.
CVE-2022-34668 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2022-34668
To remediate this vulnerability, upgrade all affected Nvflare 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 nvflare>=2.1.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show nvflare
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2022-34668, inspect your installed packages using pip:
pip show nvflare
Analyze the terminal output to locate any version of Nvflare in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.1.4), your application is affected.
Note: The pip show nvflare command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Nvflare, 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-34668 Affected Nvflare Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
nvflare
|
PyPI |
< 2.1.4
|
2.1.4
|
References
Frequently Asked Questions
What is CVE-2022-34668?
Which Nvflare versions are affected?
What version fixes CVE-2022-34668?
Is nvflare affected?
What is the CVSS score of CVE-2022-34668?
What CWE is associated with CVE-2022-34668?
How can I check PyPI dependencies for CVE-2022-34668?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6qv6-q77g-7qm6",
"modified" : "2022-09-08T14:26:34Z",
"published" : "2022-08-31T22:29:27Z",
"aliases" : [ "CVE-2022-34668" ],
"summary" : "NVFLARE unsafe deserialization due to Pickle",
"details" : "### Impact\nNVFLARE contains a vulnerability where deserialization of Untrusted Data due to Pickle usage may allow an unprivileged network attacker to cause Remote Code Execution, Denial Of Service, and Impact to both Confidentiality and Integrity. \n\nAll versions before 2.1.4 are affected. \n\nCVSS Score = 9.8 \n \n[AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H](https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) \n\n\n### Patches\n \nThe patch is included in nvflare==2.1.4 \nThis new version uses MessagePack instead of Pickle to do serialization and deserialization. \n\nSome object serializations supported by Pickle are not supported by MessagePack. We have provided out of box support for some built-in NVFLARE objects. For object serializations unsupported by MessagePack, the user will need to convert the objects to numpy or bytes before sending over to remote machines. The list of supported object types are listed in https://github.com/NVIDIA/NVFlare/blob/2.1/nvflare/fuel/utils/fobs/README.rst \n\n \n### Workarounds\n\nNo workarounds available. \n \n### Additional information \nIssue Found by: Oliver Sellwood (Nintorac) and Elias Hohl\n\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "nvflare"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.1.4"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/NVIDIA/NVFlare/security/advisories/GHSA-6qv6-q77g-7qm6"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-34668"
}, {
"type" : "WEB",
"url" : "https://github.com/NVIDIA/NVFlare/commit/6cde16f3f4711583ae4d896dfcc125d25c7d5b0d"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/NVIDIA/NVFlare"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/nvflare/PYSEC-2022-257.yaml"
}, {
"type" : "WEB",
"url" : "http://packetstormsecurity.com/files/171483/NVFLARE-Unsafe-Deserialization.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-502" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2022-08-31T22:29:27Z",
"nvd_published_at" : "2022-08-29T03:15:00Z"
}
}