CVE-2022-41892: Arches Arches Vulnerable To Execution Of Vulnerability

HIGH
Advisory Identifier: GHSA-gmpq-xrxj-xh8m
CVSS 8.6
CWE-89
Published
Advisory Summary

CVE-2022-41892 is a HIGH (CVSS 8.6) arches vulnerable to execution of vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Arches libraries in the PyPI ecosystem. The issue involves arches vulnerable to execution of arbitrary sql. Remediation is available by upgrading affected packages to version 6.1.2, 6.2.1, 7.2.0.

CVE-2022-41892 at a Glance

CVE Identifier CVE-2022-41892
GHSA Identifier GHSA-gmpq-xrxj-xh8m
Severity HIGH
CVSS v3.1 Base Score 8.6
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product Arches
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.6

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:L/I:H/A:L).

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 Low (C:L)
Integrity High (I:H)
Availability Low (A:L)

How to Fix CVE-2022-41892

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

arches fixed: 6.1.2
pip install arches>=6.1.2
arches fixed: 6.2.1
pip install arches>=6.2.1
arches fixed: 7.2.0
pip install arches>=7.2.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 arches

How to Check if You Are Affected

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

pip show arches

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

Note: The pip show arches command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In Arches, 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

### Impact With a carefully crafted web request, it's possible to execute certain unwanted sql statements against the database. Anyone running the impacted versions (<=6.1.1, 6.2.0, >=7.0.0, <=7.1.1) should upgrade as soon as possible. ### Patches The problem has been patched in the following versions: [6.1.2](https://pypi.org/project/arches/6.1.2/), [6.2.1](https://pypi.org/project/arches/6.2.1/), and [7.2.0](https://pypi.org/project/arches/7.2.0/) Users are strongly urged to upgrade to the most recent relevant patch. ### Workarounds There are no workarounds. ### General References https://www.w3schools.com/sql/sql_injection.asp https://en.wikipedia.org/wiki/SQL_injection ### For more information Post any questions to the [Arches project forum](https://community.archesproject.org/).

CVE-2022-41892 Affected Arches Versions

3 component(s)
Fixed Versions:
6.1.26.2.17.2.0
Product / Package Ecosystem Affected Versions Fixed Version
arches
PyPI
< 6.1.2
6.1.2
arches
PyPI
≥ 6.2.0
< 6.2.1
All 1 versions
6.2.0
6.2.1
arches
PyPI
≥ 7.0.0
< 7.2.0
7.2.0

References

Frequently Asked Questions

What is CVE-2022-41892?
CVE-2022-41892 is a security vulnerability in Arches involving Arches vulnerable to execution of arbitrary SQL under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which Arches versions are affected?
Affected versions include releases prior to 6.1.2, 6.2.1, 7.2.0 across affected packages: arches.
What version fixes CVE-2022-41892?
Upgrading to 6.1.2, 6.2.1, 7.2.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is arches affected?
Yes, arches is affected in releases prior to 6.1.2, 6.2.1, 7.2.0. Upgrade your dependency to 6.1.2, 6.2.1, 7.2.0 or later.
What is the CVSS score of CVE-2022-41892?
CVE-2022-41892 has a CVSS v3.1 base score of 8.6 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L.
What CWE is associated with CVE-2022-41892?
CVE-2022-41892 is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.).
How can I check PyPI dependencies for CVE-2022-41892?
Run the dependency tree command: 'pip show arches'. 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-gmpq-xrxj-xh8m",
  "modified" : "2024-09-04T19:54:07Z",
  "published" : "2022-11-11T00:05:15Z",
  "aliases" : [ "CVE-2022-41892" ],
  "summary" : "Arches vulnerable to execution of arbitrary SQL",
  "details" : "### Impact\nWith a carefully crafted web request, it's possible to execute certain unwanted sql statements against the database.  \nAnyone running the impacted versions (<=6.1.1, 6.2.0, >=7.0.0, <=7.1.1) should upgrade as soon as possible.\n\n### Patches\nThe problem has been patched in the following versions: [6.1.2](https://pypi.org/project/arches/6.1.2/), [6.2.1](https://pypi.org/project/arches/6.2.1/), and [7.2.0](https://pypi.org/project/arches/7.2.0/)\nUsers are strongly urged to upgrade to the most recent relevant patch.\n\n### Workarounds\nThere are no workarounds.\n\n### General References \nhttps://www.w3schools.com/sql/sql_injection.asp\nhttps://en.wikipedia.org/wiki/SQL_injection\n\n### For more information\nPost any questions to the [Arches project forum](https://community.archesproject.org/).\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "arches"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.1.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 6.1.1"
    }
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "arches"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.2.0"
      }, {
        "fixed" : "6.2.1"
      } ]
    } ],
    "versions" : [ "6.2.0" ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "arches"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "7.0.0"
      }, {
        "fixed" : "7.2.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 7.1.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/archesproject/arches/security/advisories/GHSA-gmpq-xrxj-xh8m"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-41892"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/archesproject/arches/commit/7ed53e23a616edf3301d95814d9d64de5e3072a9"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/archesproject/arches"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/arches/PYSEC-2022-42985.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://pypi.org/project/arches/6.1.2"
  }, {
    "type" : "WEB",
    "url" : "https://pypi.org/project/arches/7.2.0"
  }, {
    "type" : "ADVISORY",
    "url" : "https://securitylab.github.com/advisories/GHSL-2022-070_GHSL-2022-072_Arches"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-89" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-11-11T00:05:15Z",
    "nvd_published_at" : "2022-11-11T04:15:00Z"
  }
}