CVE-2022-31605: Unsafe YAML Deserialization in NVFlare

nvflare Updated 02 Oct 2025

Summary

22/06/2022
Yes i
Critical
9.8

CVE-2022-31605: Unsafe yaml deserialization in NVFlare. Affects nvflare versions < 2.1.2. Fixed in 2.1.2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

NVFlare is a package available on PyPI that provides utilities for working with YAML files. It is used to load and process YAML data in various applications. However, prior to version 2.1.2, NVFlare contained a vulnerability in its utils module. The vulnerability arises from the use of the unsafe yaml.load() function instead of the safer yaml.safe_load(). This allows for the deserialization of untrusted data, potentially leading to remote code execution, denial of service, and compromising the confidentiality and integrity of the system.

Vulnerability Detail

The vulnerability in NVFlare arises from the insecure deserialization of YAML files using yaml.load(). This can be exploited by an unprivileged network attacker to execute arbitrary code, disrupt the normal functioning of the system, and compromise the confidentiality and integrity of the data. The vulnerability has a CVSS score of 9.8, indicating its critical severity. It affects all versions of NVFlare prior to 2.1.2.

How To Fix

Minimum fixed version

2.1.2

This is the first release that contains the fix.

pip install --upgrade "nvflare==2.1.2"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If updating to the patched version is not immediately possible, a temporary workaround is to replace the usage of yaml.load() with yaml.safe_load() in the affected functions, specifically nvflare.lighter.provision.main and nvflare.lighter.utils.load_yaml. This change ensures that only safe deserialization is performed, mitigating the risk of code execution through malicious YAML data.

Conclusion

The vulnerability in NVFlare's utils module allows for unsafe YAML deserialization, which can lead to remote code execution and compromise the system's confidentiality and integrity. It is crucial to update NVFlare to version 2.1.2 or apply the recommended workaround to mitigate the risk. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for nvflare →

Share this vulnerability

FAQ

NVFlare is a package available on PyPI that provides utilities for working with YAML files. It is commonly used in applications that require parsing and processing of YAML data.

The vulnerability allows for the deserialization of untrusted data, which can be exploited by an attacker to execute arbitrary code, disrupt the system, and compromise the confidentiality and integrity of the data.

All versions of NVFlare prior to 2.1.2 are affected by this vulnerability.

The CVSS score of this vulnerability is 9.8, indicating its critical severity.

To fix the vulnerability, update NVFlare to version 2.1.2 or later. This version includes a patch that addresses the insecure deserialization issue.

Related vulnerabilities

Recent vulnerabilities recorded for nvflare.

How To Fix

Minimum fixed version

2.1.2

This is the first release that contains the fix.

pip install --upgrade "nvflare==2.1.2"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback