/

CVE-2025-70828

Severity:

HIGH RISK

(8.8)

OS Command Injection in Datart JDBC Configuration

CVE-2025-70828

Analyzed

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Datart v1.0.0-rc.3 contains an OS command injection vulnerability in the JDBC configuration functionality, where the url parameter can be abused to execute arbitrary system commands.

When attacker-controlled input is incorporated into the JDBC URL without proper sanitization or restriction, an attacker may achieve remote code execution on the underlying server hosting Datart.

Affected context

This vulnerability arises in deployments of Datart v1.0.0-rc.3 that allow users to configure or edit JDBC connections through an administrative or data-source configuration interface.

The risk is greatest when:

  • JDBC configuration can be influenced by untrusted or low-trust users
  • The backend uses the supplied JDBC URL in a way that can invoke system-level commands or command-like operations
  • There are no strong validation or restrictions on the url parameter beyond basic formatting checks

Exploit preconditions

  • Attack surface: Datart server endpoints or UI features that accept JDBC configuration data (specifically the url parameter).
  • Required access: Ability to create, modify, or submit JDBC configurations (e.g., via authenticated admin or misconfigured roles; in some cases via exposed APIs).
  • Trigger point: Server-side processing of the JDBC configuration when testing, validating, or using the connection defined by the attacker-controlled url.
  • Why exploitation is possible: The implementation allows user-controlled data from the url field to influence command-like behavior or configuration in a way that can break out of expected JDBC semantics, leading to arbitrary OS command execution (CWE-78).

Why this happens

The core issue is improper neutralization of special elements used in OS commands when building or handling the JDBC connection from user-supplied configuration.

Instead of treating the JDBC URL as opaque data and strictly constraining it to safe patterns, the backend logic appears to either:

  • Incorporate the url into a command string or shell invocation, or
  • Allow a driver or integration mechanism that interprets parts of the URL as executable instructions.

This pattern maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where attacker-controlled input is allowed to alter the behavior of command execution on the server.

Potential impact

  • Execution of arbitrary commands with the privileges of the Datart server process
  • Full compromise of the Datart host, including data theft and service disruption
  • Access to or modification of connected databases and analytics data
  • Use of the compromised server as a pivot point for lateral movement within the network
  • Deployment of malware, cryptominers, or backdoors on the affected system

General mitigation guidance

Effective mitigation focuses on restricting how JDBC URLs are accepted and processed and on minimizing the authority granted to the Datart process:

  • Treat all JDBC configuration fields, especially url, as untrusted input; apply strict allowlists for supported schemes, hosts, ports, and parameters.
  • Avoid constructing shell commands or external tool invocations using raw user-supplied JDBC URLs; prefer direct API calls with structured parameters.
  • Normalize and validate the URL against expected patterns for supported drivers, rejecting unexpected prefixes, separators, or command-like constructs.
  • Run the Datart service under a non-privileged account and follow least-privilege principles, reducing the damage potential of any command execution.
  • Segment network access so that even if an instance is compromised, it has limited reach to critical internal systems.

How teams detect issues like this

Detection typically involves code-level review, runtime monitoring, and configuration governance:

  • Static analysis & review: Search for patterns where JDBC URLs or other connection parameters are concatenated into command strings, passed to shells, or handled by generic process-execution APIs.
  • Security code review: Examine data-source configuration handlers, especially where new connections are tested or validated, ensuring that user input does not influence OS-level commands.
  • Runtime monitoring: Deploy host-based intrusion detection or EDR tools that flag unusual child processes spawned by the Datart service and suspicious command-line arguments tied to JDBC actions.
  • Configuration audits: Periodically review configured JDBC URLs for unexpected protocols, embedded control characters, or unusual parameters that may indicate exploitation attempts.

Sources

SourceLink
dev.mysql.comdev.mysql.com/doc/connector-j/en/connector-j-connprops-interceptor-classes-and-interfaces.html
github.comgithub.com/xiaoxiaoranxxx/CVE-2025-70828

Frequently asked

questions

Yes, if an attacker can reach the Datart interface or API that accepts JDBC configuration and can control the url parameter, they may be able to trigger code execution remotely, subject to authentication and access controls.

Typically, the attacker needs the ability to create or edit JDBC configurations. This is often limited to administrative or privileged roles, but misconfigurations, shared accounts, or exposed APIs can widen the attack surface.

Enforce strict validation and normalization of JDBC URLs, remove any logic that constructs or invokes shell commands using user-supplied configuration, and ensure that JDBC connections are created via safe, parameterized APIs rather than through command-line wrappers.

Adopt a secure coding policy that forbids incorporating untrusted input into OS command strings, mandate input validation and allowlisting for all configuration parameters, and integrate security reviews and automated checks for command injection patterns in the development lifecycle.

Find out what's already
exploitable in your codebase.