6.3medium
Apache Superset: Privilege escalation with default examples database
- Severity
- 6.3medium CVSS:3.1 by apache
- Exploit likelihood
- 1.79% (higher than 79% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- apache
- Also known as
- GHSA-f678-j579-4xf5BIT-SUPERSET-2023-40610PYSEC-2026-1173
Description
Improper authorization check and possible privilege escalation on Apache Superset up to but excluding 2.1.2. Using the default examples database connection that allows access to both the examples schema and Apache Superset's metadata database, an attacker using a specially crafted CTE SQL statement could change data on the metadata database. This weakness could result on tampering with the authentication/authorization data.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Apache Software Foundation Apache Superset | before 2.1.2 | CVE List |
| apache-superset (PyPI) | before 2.1.2 | GitHub Advisory Database, PyPA Advisory Database |
| apache superset | before 2.1.2 | NVD |
| superset (Bitnami) | before 2.1.2 | Bitnami Vulnerability Database |
All scores
| apache | 6.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:N/I:H/A:N |
| GitHub | 7.3high CVSS:3.1 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N |
| NVD | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| PyPA Advisory Database | 7.3high CVSS:3.1 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N |
| Bitnami Vulnerability Database | high rating |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
Improper authorization check and possible privilege escalation on Apache Superset up to but excluding 2.1.2. Using the default examples database connection that allows access to both the examples schema and Apache Superset's metadata database, an attacker using a specially crafted CTE SQL statement could change data on the metadata database. This weakness could result on tampering with the authentication/authorization data.
GitHub Advisory Database
Overview
An attacker with access to the SQL Lab and the ab_user and ab_user_role tables can elevate his privileges to become administrator.
Details
On a more general level, diverse tables who are supposed to be only readable can be modified using the WITH … AS and RETURNING keywords. Modification of the table key_value can also be done, which could lead to a Remote Code Execution (cf. "V7 - Insecure deserialization leading to remote code execution" report vulnerability).
Proof of Concept
Some tables are supposed to accept only SELECT requests from the SQL tab.
- Attempt to create a new user injected_admin into the ab_user table: PoC_1
But this protection can be bypassed by using the WITH … AS () syntax with RETURNING value after the INSERT / UPDATE / DELETE query. INSERT query accepted by the database due to the use of WITH … AS ( … RETURNING ) syntax: WITH a AS ( INSERT INTO ab_user (id, first_name, last_name, username, email, password) VALUES (2, ‘injected_admin’, ‘injected_admin’, ‘injected_admin’, ‘injected_admin@gmail.com’, ‘{PASSWORD_HASH}’) RETURNING id ) SELECT * FROM a; PoC_2
- injected_admin added to the ab_user table: PoC_3
This method can also be used with UPDATE or DELETE request. A user with access to SELECT on the tables ab_user_role can escalate his privilege to become administrator.
- Locating the ID of the user ‘Auditeur B’, who has no rights and is not an admin. The request is done being ‘Auditeur B’: PoC_4
- Locating the rows that keep the role of the user ‘Auditeur B’. The row 36 stores the value 3, indicating the role ‘Alpha’ for ‘Auditeur B’: PoC_5
- Modification of the row 36 with an UPDATE request embedded in a WITH request: PoC_6
- ‘Auditeur B’ role has been changed to Admin: PoC_7
This technique can also be used to inject or modify values of the table key_value, which can potentially lead to a Remote Code Execution (cf. ...).
Solution
Orange recommendation
To fix this vulnerability, we recommends reenforcing the SELECT filter to spot INSERT / UPDATE / DELETE keywords even in WITH requests.
Security patch
Upgrade to Superset version 2.1.2.
References
https://nvd.nist.gov/vuln/detail/CVE-2023-40610 https://lists.apache.org/thread/jvgxpk4dbxyqtsgtl4pdgbd520rc0rot
Credits
LEXFO for Orange Innovation
Orange CERT-CC at Orange group
Timeline
Date reported: July 27, 2023 Date fixed: November 27, 2023
NVD (es)
Verificación de autorización incorrecta y posible escalada de privilegios en Apache Superset hasta 2.1.2, pero excluyéndolo. Utilizando la conexión de base de datos de ejemplos predeterminada que permite el acceso tanto al esquema de ejemplos como a la base de datos de metadatos de Apache Superset, un atacante que utilice una declaración SQL CTE especialmente manipulada podría cambiar los datos de la base de datos de metadatos. Esta debilidad podría resultar en la manipulación de los datos de autenticación/autorización.
References
| https://lists.apache.org/thread/jvgxpk4dbxyqtsgtl4pdgbd520rc0rot | advisory, mailing-list, vendor-advisory, web | |
| http://www.openwall.com/lists/oss-security/2023/11/27/2 | advisory, mailing-list, third-party-advisory, web | |
| https://github.com/orangecertcc/security-research/security/advisories/GHSA-f678-j579-4xf5 | web | |
| https://nvd.nist.gov/vuln/detail/CVE-2023-40610 | advisory, web | |
| https://github.com/apache/superset | package | |
| https://pypi.org/project/apache-superset | package | |
| https://github.com/advisories/GHSA-f678-j579-4xf5 | advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-40610 changed 2025-06-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-f678-j579-4xf5 changed 2026-07-08 | CC-BY-4.0 |
| NVD | CVE-2023-40610 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2026-1173 changed 2026-07-07 | CC-BY-4.0 |
| Bitnami Vulnerability Database | BIT-SUPERSET-2023-40610 changed 2026-09-08 | Apache-2.0 |