CVE-2021-23338: Pyqlib Qlib Deserialization Of Untrusted Data Vulnerability
MODERATECVE-2021-23338 is a MODERATE (CVSS 6.6) qlib deserialization of untrusted data vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Pyqlib libraries in the PyPI ecosystem. The issue involves qlib deserialization of untrusted data vulnerability. Remediation is available by upgrading affected packages to version 0.7.0.
CVE-2021-23338 at a Glance
Security Impact
CVSS: 6.6
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2021-23338
To remediate this vulnerability, upgrade all affected Pyqlib 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 pyqlib>=0.7.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show pyqlib
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2021-23338, inspect your installed packages using pip:
pip show pyqlib
Analyze the terminal output to locate any version of Pyqlib in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.7.0), your application is affected.
Note: The pip show pyqlib 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 Pyqlib, 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-2021-23338 Affected Pyqlib Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pyqlib
|
PyPI |
< 0.7.0
|
0.7.0
|
References
Frequently Asked Questions
What is CVE-2021-23338?
Which Pyqlib versions are affected?
What version fixes CVE-2021-23338?
Is pyqlib affected?
What is the CVSS score of CVE-2021-23338?
What CWE is associated with CVE-2021-23338?
How can I check PyPI dependencies for CVE-2021-23338?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hjr4-fhgp-23g9",
"modified" : "2024-10-14T16:09:46Z",
"published" : "2022-05-24T17:42:16Z",
"aliases" : [ "CVE-2021-23338" ],
"summary" : "qlib Deserialization of Untrusted Data vulnerability",
"details" : "This affects all versions of package qlib. The workflow function in cli part of qlib was using an unsafe YAML load function.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "pyqlib"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.7.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-23338"
}, {
"type" : "WEB",
"url" : "https://github.com/418sec/huntr/pull/1329"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/microsoft/qlib"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/pyqlib/PYSEC-2021-86.yaml"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-PYTHON-PYQLIB-1085990"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-PYTHON-QLIB-1054635"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-502", "CWE-94" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-04-29T11:02:15Z",
"nvd_published_at" : "2021-02-15T16:15:00Z"
}
}