# CVE-2024-39887: PYSEC-2026-1155 - Apache Superset vulnerable to improper SQL authorization

Source: https://junglewise.ai/threats/cve-2024-39887-apache-superset-improper-sql-authorization-with-engine-functions  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-07. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

CVE-2024-39887 · Severity: low · CVSS 3.1 · Published 2026-07-07

Apache Superset is a data visualization and business intelligence platform that allows users to query databases through a web interface. An authorization bypass flaw permits authenticated users to execute unauthorized SQL commands using certain database-specific functions (such as PostgreSQL's version(), query_to_xml(), inet_server_addr(), and inet_client_addr()) that were not properly restricted. An attacker with legitimate database access could exploit this to extract sensitive information or manipulate data beyond their intended permissions.

Technologies: [Apache Superset](https://junglewise.ai/threats/technologies/superset), [apache-superset (PyPI)](https://junglewise.ai/threats/technologies/apache-superset). Vendors: [Apache](https://junglewise.ai/threats/vendors/apache), [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2024-39887 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2024-39887 being exploited in the wild.

**How severe is CVE-2024-39887?** Low severity, with a CVSS score of 3.1, published 7 July 2026.

**Which products and versions are affected?** Apache Superset before 4.0.2; apache-superset (PyPI) ECOSYSTEM:introduced=0,fixed=4.0.2.

**Is there a fix for CVE-2024-39887?** Yes. apache-superset (PyPI): upgrade to 4.0.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2024-39887 attacked?** It is attacked over the network.

**Am I affected by CVE-2024-39887?** Check whether you run Apache Superset or apache-superset (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- apache-superset (PyPI): upgrade to 4.0.2 or later

  ```sh
  pip install "apache-superset>=4.0.2"
  ```


## Technical details

This vulnerability is an SQL injection/authorization bypass (CWE-89) caused by improper neutralization of special SQL elements. The root cause is insufficient validation of certain database engine-specific functions in SQL queries. An authenticated attacker with SQL execution privileges can bypass Superset's SQL authorization controls by using functions like PostgreSQL's version(), query_to_xml(), inet_server_addr(), and inet_client_addr() to extract unauthorized information. The vulnerability requires prior authentication and network access to the Superset instance. A mitigation was implemented via a new DISALLOWED_SQL_FUNCTIONS configuration key that allows administrators to blacklist dangerous functions per database engine. The fix is available in Superset 4.0.2 and later.

## Affected products

- Apache Superset before 4.0.2

## Identifiers

- CVE-2024-39887
- GHSA-2q6j-vpvr-6pvj
- PYSEC-2026-1155

## Timeline

- 2024-07-16: disclosed
- 2024-07-16: patched: fix available in version 4.0.2

## References

- [https://github.com/apache/superset/commit/56f0103b5771d477dd106272abbd8021c9ea7506](https://github.com/apache/superset/commit/56f0103b5771d477dd106272abbd8021c9ea7506)

## Related threats

- [PYSEC-2026-2376 - Apache Superset: Read-Only Bypass via Improper Input Validation on PostgreSQL Connections](https://junglewise.ai/threats/cve-2026-23984-apache-superset-read-only-bypass-via-improper-input-validation-on)
- [PYSEC-2026-2375 - Apache Superset allows authenticated users to view sensitive data without explicit permissions](https://junglewise.ai/threats/cve-2026-23983-apache-superset-allows-authenticated-users-to-view-sensitive-data)
- [PYSEC-2026-2373 - Apache Superset: Incomplete DISALLOWED_SQL_FUNCTIONS default list for ClickHouse engine](https://junglewise.ai/threats/cve-2026-23969-apache-superset-incomplete-disallowed-sql-functions-default-list)
- [PYSEC-2026-2374 - Apache Superset allows privileged users to conduct error-based SQL Injection](https://junglewise.ai/threats/cve-2026-23980-apache-superset-allows-privileged-users-to-conduct-error-based)
- [PYSEC-2026-2372 - Apache Superset Improper Authorization allows low-privileged users to bypass access controls](https://junglewise.ai/threats/cve-2026-23982-apache-superset-improper-authorization-in-dataset-access-controls)
