Vulnerabilities in pkg:pypi/pyqlib

PACKAGE
Advisory Identifier: GHSA-hjr4-fhgp-23g9
Advisory Summary

CVE-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.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/pyqlib

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/pyqlib. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-hjr4-fhgp-23g9 CVE-2021-23338 MODERATE qlib Deserialization of Untrusted Data vulnerability

CVE-2021-23338 at a Glance

CVE Identifier CVE-2021-23338
GHSA Identifier GHSA-hjr4-fhgp-23g9
Severity MODERATE
CVSS v3.1 Base Score 6.6
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product Pyqlib
Package Ecosystem PyPI
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (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.

pyqlib fixed: 0.7.0
pip install pyqlib>=0.7.0
Verify Direct and Transitive Dependencies

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

This affects all versions of package qlib. The workflow function in cli part of qlib was using an unsafe YAML load function.

CVE-2021-23338 Affected Pyqlib Versions

1 component(s)
Fixed Versions:
0.7.0
Product / Package Ecosystem Affected Versions Fixed Version
pyqlib
PyPI
< 0.7.0
0.7.0

References

Frequently Asked Questions

What is CVE-2021-23338?
CVE-2021-23338 is a security vulnerability in Pyqlib involving qlib Deserialization of Untrusted Data vulnerability under CWE-502: Deserialization of Untrusted Data.
Which Pyqlib versions are affected?
Affected versions include releases prior to 0.7.0 across affected packages: pyqlib.
What version fixes CVE-2021-23338?
Upgrading to 0.7.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pyqlib affected?
Yes, pyqlib is affected in releases prior to 0.7.0. Upgrade your dependency to 0.7.0 or later.
What is the CVSS score of CVE-2021-23338?
CVE-2021-23338 has a CVSS v3.1 base score of 6.6 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2021-23338?
CVE-2021-23338 is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check PyPI dependencies for CVE-2021-23338?
Run the dependency tree command: 'pip show pyqlib'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}