9.8critical
Dataease Mysql Data Source JDBC Connection Parameters Not Verified Leads to Deserialization Vulnerability
- Severity
- 9.8critical CVSS:3.1 by GitHub_M
- Exploit likelihood
- 1.97% (higher than 81% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-q4qq-jhjv-7rh2
Description
Dataease is an open source data visualization analysis tool. Dataease prior to 1.15.2 has a deserialization vulnerability. In Dataease, the Mysql data source in the data source function can customize the JDBC connection parameters and the Mysql server target to be connected. In `backend/src/main/java/io/dataease/provider/datasource/JdbcProvider.java`, the `MysqlConfiguration` class does not filter any parameters. If an attacker adds some parameters to a JDBC url and connects to a malicious mysql server, the attacker can trigger the mysql jdbc deserialization vulnerability. Through the deserialization vulnerability, the attacker can execute system commands and obtain server privileges. Version 1.15.2 contains a patch for this issue.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| dataease dataease | < 1.15.2, before 1.15.2 | CVE List, NVD |
| io.dataease:dataease-plugin-common (Maven) | before 1.15.2 | GitHub Advisory Database |
All scores
| GitHub_M | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Classification
What each source says
CVE List
Dataease is an open source data visualization analysis tool. Dataease prior to 1.15.2 has a deserialization vulnerability. In Dataease, the Mysql data source in the data source function can customize the JDBC connection parameters and the Mysql server target to be connected. In `backend/src/main/java/io/dataease/provider/datasource/JdbcProvider.java`, the `MysqlConfiguration` class does not filter any parameters. If an attacker adds some parameters to a JDBC url and connects to a malicious mysql server, the attacker can trigger the mysql jdbc deserialization vulnerability. Through the deserialization vulnerability, the attacker can execute system commands and obtain server privileges. Version 1.15.2 contains a patch for this issue.
GitHub Advisory Database
Impact
In Dataease, the Mysql data source in the data source function can customize the JDBC connection parameters and the Mysql server target to be connected. 6fc8d5c539807157ee471464b184ab66
In backend/src/main/java/io/dataease/provider/datasource/JdbcProvider.java, MysqlConfiguration class don't filter any parameters, directly concat user input.
@Getter
@Setter
public class MysqlConfiguration extends JdbcConfiguration {
private String driver = "com.mysql.jdbc.Driver";
private String extraParams = "characterEncoding=UTF-8&connectTimeout=5000&useSSL=false&allowPublicKeyRetrieval=true&zeroDateTimeBehavior=convertToNull";
public String getJdbc() {
if(StringUtils.isEmpty(extraParams.trim())){
return "jdbc:mysql://HOSTNAME:PORT/DATABASE"
.replace("HOSTNAME", getHost().trim())
.replace("PORT", getPort().toString().trim())
.replace("DATABASE", getDataBase().trim());
}else {
return "jdbc:mysql://HOSTNAME:PORT/DATABASE?EXTRA_PARAMS"
.replace("HOSTNAME", getHost().trim())
.replace("PORT", getPort().toString().trim())
.replace("DATABASE", getDataBase().trim())
.replace("EXTRA_PARAMS", getExtraParams().trim());
}
}
}
So, if the attack add some parameters in JDBC url, and connect to evil mysql server, he can trigger the mysql jdbc deserialization vulnerability, and eventually the attacker can execute through the deserialization vulnerability system commands and obtain server privileges.
Affected versions: < 1.15.2
Patches
The vulnerability has been fixed in v1.15.2.
https://github.com/dataease/dataease/blob/6c3a011955c5c753ffd616d030bea5db4793c51c/backend/src/main/java/io/dataease/dto/datasource/MysqlConfiguration.java#L19
the MysqlConfiguration class use illegalParameters filter illegal parameters to fix this vulnerability.
@Getter
@Setter
public class MysqlConfiguration extends JdbcConfiguration {
private String driver = "com.mysql.jdbc.Driver";
private String extraParams = "characterEncoding=UTF-8&connectTimeout=5000&useSSL=false&allowPublicKeyRetrieval=true&zeroDateTimeBehavior=convertToNull";
private List<String> illegalParameters = Arrays.asList("autoDeserialize", "queryInterceptors", "statementInterceptors", "detectCustomCollations");
public String getJdbc() {
if (StringUtils.isEmpty(extraParams.trim())) {
return "jdbc:mysql://HOSTNAME:PORT/DATABASE"
.replace("HOSTNAME", getHost().trim())
.replace("PORT", getPort().toString().trim())
.replace("DATABASE", getDataBase().trim());
} else {
for (String illegalParameter : illegalParameters) {
if (getExtraParams().contains(illegalParameter)) {
throw new RuntimeException("Illegal parameter: " + illegalParameter);
}
}
return "jdbc:mysql://HOSTNAME:PORT/DATABASE?EXTRA_PARAMS"
.replace("HOSTNAME", getHost().trim())
.replace("PORT", getPort().toString().trim())
.replace("DATABASE", getDataBase().trim())
.replace("EXTRA_PARAMS", getExtraParams().trim());
}
}
}
Workarounds
It is recommended to upgrade the version to v1.15.2.
For more information
If you have any questions or comments about this advisory:
- Open an issue in https://github.com/dataease/dataease
- Email us at wei@fit2cloud.com
NVD (es)
Dataease es una herramienta de análisis de visualización de datos de código abierto. Dataease versiones anteriores a 1.15.2, presenta una vulnerabilidad de deserialización. En Dataease, la fuente de datos Mysql en la función de fuente de datos puede personalizar los parámetros de conexión JDBC y el objetivo del servidor Mysql a conectar. En "backend/src/main/java/io/dataease/provider/datasource/JdbcProvider.java", la clase "MysqlConfiguration" no filtra ningún parámetro. Si un atacante añade algunos parámetros a una url JDBC y es conectado a un servidor mysql malicioso, el atacante puede desencadenar una vulnerabilidad de deserialización mysql jdbc. Mediante una vulnerabilidad de deserialización, el atacante puede ejecutar comandos del sistema y obtener privilegios del servidor. La versión 1.15.2 contiene un parche para este problema
References
| https://github.com/dataease/dataease/security/advisories/GHSA-q4qq-jhjv-7rh2 | exploit, third-party-advisory, web | |
| https://github.com/dataease/dataease/pull/3328 | patch, third-party-advisory, web | |
| https://github.com/dataease/dataease/commit/956ee2d6c9e81349a60aef435efc046888e10a6d | patch, third-party-advisory, web | |
| https://github.com/dataease/dataease/releases/tag/v1.15.2 | release-notes, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2022-39312 | advisory | |
| https://github.com/dataease/dataease | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-39312 changed 2025-04-22 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-q4qq-jhjv-7rh2 changed 2023-11-08 | CC-BY-4.0 |
| NVD | CVE-2022-39312 changed 2026-06-17 | Public domain |