dromara / dromara/dataCompare

Vulnerability: Arbitrary File Read and Deserialization in dataCompare ≤ 1.0.1

Open
#13 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
280
Forks
63
PR merge metrics
No merged PRs in 30d

Description

**BUG_Author:** R1ckyZ

**Affected Version:** dataCompare ≤ 1.0.1

**Vendor:** [dromara](https://github.com/dromara)

**Software:** [dataCompare](https://github.com/dromara/dataCompare)

**Vulnerability** **Files:**

- `src/main/java/com/vince/xq/project/system/dbconfig/service/DbconfigServiceImpl.java`

## Description:

The `DbConfig` does not validate or sanitize the JDBC URL. An attacker can inject dangerous connection parameters such as `allowLoadLocalInfile`, `allowUrlInLocalInfile`, and `autoDeserialize` into the JDBC URL. When the connection test is performed in `DbconfigServiceImpl`, these properties are activated, potentially leading to arbitrary file read, SSRF, or deserialization-based remote code execution.

Image

Image

## Proof of Concept:

1. After logging in, access the API `/system/dbconfig/testConnection` and pass a carefully crafted JDBC connection via POST parameters, as shown in the image below.

Image

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.