Vulnerabilities in pkg:pypi/api-res-py

PACKAGE
Advisory Identifier: GHSA-6978-4w92-428p
Advisory Summary

CVE-2022-31313 is a CRITICAL (CVSS 9.8) backdoor vulnerability (General Security Weakness) affecting Api res py libraries in the PyPI ecosystem. The issue involves backdoor in api-res-py. Remediation is available in the latest vendor maintenance releases.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/api-res-py

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/api-res-py. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-6978-4w92-428p CVE-2022-31313 CRITICAL Backdoor in api-res-py

CVE-2022-31313 at a Glance

CVE Identifier CVE-2022-31313
GHSA Identifier GHSA-6978-4w92-428p
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification General Security Weakness
Affected Product Api res py
Package Ecosystem PyPI
Published Date
Last Updated

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

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
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-2022-31313

To remediate this vulnerability, upgrade all affected Api res py dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

api-res-py fixed: Latest secure release
pip install api-res-py>=Latest secure release
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 api-res-py

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2022-31313, inspect your installed packages using pip:

pip show api-res-py

Analyze the terminal output to locate any version of Api res py in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The pip show api-res-py command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Api res py, 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

api-res-py package in PyPI 0.1 is vulnerable to a code execution backdoor in the request package.

CVE-2022-31313 Affected Api res py Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
api-res-py
PyPI
≤ 0.1

References

Frequently Asked Questions

What is CVE-2022-31313?
CVE-2022-31313 is a security vulnerability in Api res py involving Backdoor in api-res-py under General Security Weakness.
Which Api res py versions are affected?
Affected versions include releases prior to current release patches across affected packages: api-res-py.
What version fixes CVE-2022-31313?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is api-res-py affected?
Yes, api-res-py is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2022-31313?
CVE-2022-31313 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2022-31313?
CVE-2022-31313 is classified under General Security Weakness.
How can I check PyPI dependencies for CVE-2022-31313?
Run the dependency tree command: 'pip show api-res-py'. 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-6978-4w92-428p",
  "modified" : "2024-11-21T21:40:07Z",
  "published" : "2022-06-09T00:00:16Z",
  "aliases" : [ "CVE-2022-31313" ],
  "summary" : "Backdoor in api-res-py",
  "details" : "api-res-py package in PyPI 0.1 is vulnerable to a code execution backdoor in the request package.",
  "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" : "api-res-py"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-31313"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rakeshrkz7/as_api_res/issues/1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/api-res-py/PYSEC-2022-43071.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/rakeshrkz7/as_api_res"
  }, {
    "type" : "WEB",
    "url" : "https://pypi.org/project/api-res-py"
  }, {
    "type" : "WEB",
    "url" : "http://pypi.doubanio.com/simple/request"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-06-17T21:51:19Z",
    "nvd_published_at" : "2022-06-08T20:15:00Z"
  }
}