Skip to main content
CVE Vulnerability Database

CVE-2026-8759: Xiandafu Beetl RCE Vulnerability

CVE-2026-8759 is a remote code execution flaw in xiandafu beetl (up to version 3.20.2) affecting the SpELFunction component. Attackers can exploit this to execute arbitrary code. This article covers technical details, affected versions, impact analysis, and mitigation strategies.

Published:

CVE-2026-8759 Overview

CVE-2026-8759 is an expression language injection vulnerability in the Beetl template engine maintained by xiandafu. The flaw affects versions up to and including 3.20.2 and resides in the SpELFunction component at beetl-classic-integration/beetl-spring-classic/src/main/java/org/beetl/ext/spring/SpELFunction.java. The vulnerability stems from improper neutralization of special elements used in a Spring Expression Language (SpEL) statement [CWE-20]. Remote attackers can exploit the issue without authentication, and a public exploit is available. The project maintainer was notified through an issue report but has not yet responded.

Critical Impact

Remote attackers can inject crafted SpEL expressions that the SpELFunction evaluates, leading to limited confidentiality, integrity, and availability impact on applications embedding Beetl.

Affected Products

  • xiandafu Beetl versions up to 3.20.2
  • Beetl beetl-spring-classic integration module
  • The SpELFunction component within beetl-classic-integration

Discovery Timeline

  • 2026-05-17 - CVE-2026-8759 published to the National Vulnerability Database
  • 2026-05-18 - Last updated in NVD database

Technical Details for CVE-2026-8759

Vulnerability Analysis

The vulnerability resides in the SpELFunction class shipped with Beetl's Spring integration module. This component evaluates Spring Expression Language strings inside Beetl templates. The implementation does not properly neutralize special elements supplied through expression inputs. Attacker-controlled values reach the SpEL evaluator and are interpreted as code rather than data. The exploitation surface is exposed across the network, requires no privileges, and needs no user interaction. According to the EPSS dataset published on 2026-05-21, exploitation probability remains low, but a public proof of concept lowers the barrier for opportunistic attacks.

Root Cause

The root cause is improper input validation [CWE-20] inside SpELFunction.java. The function accepts string inputs intended as expressions and passes them to Spring's SpEL parser without restricting reachable types, methods, or properties. SpEL by design supports method invocation and type references, so any unsanitized expression path becomes a code path. Applications that allow user-supplied data to reach a Beetl template invoking this function inherit the weakness.

Attack Vector

An attacker submits a crafted SpEL expression through any application input that flows into a Beetl template calling SpELFunction. When the template renders, the parser evaluates the malicious expression. The result is improper neutralization of expression language statements, which can disclose data, alter application state, or trigger errors that degrade availability. Public exploit material referenced through VulDB submission #811316 and VulDB entry #364386 describes the exposure. Refer to the Gitee Issue IIYAWC and VulDB Vulnerability #364386 for additional technical details.

Detection Methods for CVE-2026-8759

Indicators of Compromise

  • Template rendering errors or stack traces referencing org.beetl.ext.spring.SpELFunction or org.springframework.expression
  • Inbound HTTP request parameters containing SpEL syntax such as T(java.lang.Runtime), #{...}, or new java.lang.ProcessBuilder
  • Unexpected child processes spawned from Java application servers hosting Beetl-based applications

Detection Strategies

  • Inspect application logs for SpEL parser exceptions originating from the beetl-spring-classic module
  • Search source repositories for direct or indirect calls to SpELFunction that receive untrusted input
  • Apply web application firewall rules that flag SpEL meta-characters in user-controlled fields reaching template-rendering endpoints

Monitoring Recommendations

  • Track outbound network connections and process creation events from JVMs running Beetl to detect post-exploitation behavior
  • Alert on file reads of sensitive paths such as /etc/passwd or Windows credential stores by Java processes hosting Beetl templates
  • Correlate template rendering endpoints with abnormal CPU or memory spikes that may indicate expression evaluation abuse

How to Mitigate CVE-2026-8759

Immediate Actions Required

  • Inventory all applications that depend on beetl-classic-integration/beetl-spring-classic at version 3.20.2 or earlier
  • Remove or restrict template paths that invoke SpELFunction with attacker-reachable input
  • Add server-side input validation that rejects SpEL meta-characters before data reaches template rendering

Patch Information

No official patch has been released. The project maintainer was informed through an issue report on the Gitee tracker but has not responded. Monitor the Gitee Project Repository and the Gitee Issue IIYAWC for updates. Track VulDB Vulnerability #364386 for additional intelligence.

Workarounds

  • Disable or remove the SpELFunction registration in the Spring integration if not required by the application
  • Wrap any required SpEL evaluation behind a strict allowlist of expression patterns and reject everything else
  • Run Beetl-based applications under a least-privilege service account to constrain the impact of successful injection
  • Deploy WAF signatures that block SpEL syntax tokens such as T(, new , and ${ in request parameters reaching template endpoints

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.