CVE-2022-41703: Apache superset SQL Injection Vulnerability

MODERATE
Advisory Identifier: GHSA-cxvp-3frm-3876
CVSS 5.4
CWE-89
Published
Advisory Summary

CVE-2022-41703 is a MODERATE (CVSS 5.4) sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Apache superset libraries in the PyPI ecosystem. The issue involves apache superset's sql alchemy connector vulnerable to sql injection. Remediation is available in the latest vendor maintenance releases.

CVE-2022-41703 at a Glance

CVE Identifier CVE-2022-41703
GHSA Identifier GHSA-cxvp-3frm-3876
Severity MODERATE
CVSS v3.1 Base Score 5.4
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product Apache superset
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.4

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2022-41703

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

apache-superset fixed: Latest secure release
pip install apache-superset>=Latest secure release
apache-superset fixed: Latest secure release
pip install apache-superset>=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 apache-superset

How to Check if You Are Affected

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

pip show apache-superset

Analyze the terminal output to locate any version of Apache superset 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 apache-superset 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 Apache superset, 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

A vulnerability in the SQL Alchemy connector of Apache Superset allows an authenticated user with read access to a specific database to add subqueries to the WHERE and HAVING fields referencing tables on the same database that the user should not have access to, despite the user having the feature flag "ALLOW_ADHOC_SUBQUERY" disabled (default value). This issue affects Apache Superset version 1.5.2 and prior versions and version 2.0.0.

CVE-2022-41703 Affected Apache superset Versions

2 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
apache-superset
PyPI
≤ 1.5.2
apache-superset
PyPI
2.0.0
All 1 versions
2.0.0
None specified

References

Frequently Asked Questions

What is CVE-2022-41703?
CVE-2022-41703 is a security vulnerability in Apache superset involving Apache Superset's SQL Alchemy connector vulnerable to SQL Injection under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which Apache superset versions are affected?
Affected versions include releases prior to current release patches across affected packages: apache-superset.
What version fixes CVE-2022-41703?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is apache-superset affected?
Yes, apache-superset 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-41703?
CVE-2022-41703 has a CVSS v3.1 base score of 5.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2022-41703?
CVE-2022-41703 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-41703?
Run the dependency tree command: 'pip show apache-superset'. 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-cxvp-3frm-3876",
  "modified" : "2025-04-08T22:02:20Z",
  "published" : "2023-01-16T12:30:18Z",
  "aliases" : [ "CVE-2022-41703" ],
  "summary" : "Apache Superset's SQL Alchemy connector vulnerable to SQL Injection",
  "details" : "A vulnerability in the SQL Alchemy connector of Apache Superset allows an authenticated user with read access to a specific database to add subqueries to the WHERE and HAVING fields referencing tables on the same database that the user should not have access to, despite the user having the feature flag \"ALLOW_ADHOC_SUBQUERY\" disabled (default value). This issue affects Apache Superset version 1.5.2 and prior versions and version 2.0.0.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "apache-superset"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.5.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "apache-superset"
    },
    "versions" : [ "2.0.0" ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-41703"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/superset"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/g7jjw0okxjk5y57pbbxy19ydw42kqcos"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-89" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-01-20T23:17:15Z",
    "nvd_published_at" : "2023-01-16T11:15:00Z"
  }
}