CVE-2025-66916 Overview
A critical code injection vulnerability has been identified in the snailjob component of RuoYi-Vue-Plus, a popular enterprise-grade rapid development platform built on Vue and Spring Boot. The vulnerability exists in the /snail-job/workflow/check-node-expression interface, which executes QLExpress expressions without properly filtering user input. This flaw allows attackers to leverage the File class to perform arbitrary file reading and writing operations on the affected system.
Critical Impact
Remote unauthenticated attackers can exploit this QLExpress expression injection vulnerability to read sensitive configuration files, write malicious content, and potentially achieve full system compromise through arbitrary file operations.
Affected Products
- RuoYi-Vue-Plus version 5.5.1 and earlier
- snailjob component with QLExpress expression evaluation enabled
- Applications using the vulnerable /snail-job/workflow/check-node-expression endpoint
Discovery Timeline
- 2026-01-08 - CVE-2025-66916 published to NVD
- 2026-01-08 - Last updated in NVD database
Technical Details for CVE-2025-66916
Vulnerability Analysis
This vulnerability is classified as CWE-94 (Improper Control of Generation of Code - Code Injection). The snailjob component in RuoYi-Vue-Plus implements a workflow expression validation endpoint that evaluates QLExpress expressions provided by users. QLExpress is a dynamic scripting language for Java applications that allows runtime code execution, making it a powerful but potentially dangerous feature when exposed without proper input sanitization.
The vulnerable endpoint /snail-job/workflow/check-node-expression accepts user-supplied expressions and passes them directly to the QLExpress engine for evaluation. The lack of input filtering or sandboxing allows attackers to craft malicious expressions that instantiate Java classes, including java.io.File and related I/O classes. This enables unauthorized filesystem access with the privileges of the application server process.
The attack surface is particularly concerning as it can be exploited remotely over the network without authentication, requiring no user interaction to succeed.
Root Cause
The root cause of this vulnerability is the absence of input validation and expression sandboxing in the QLExpress expression evaluation flow. The application fails to:
- Implement a whitelist of allowed classes and methods within QLExpress expressions
- Filter dangerous Java classes such as java.io.File, java.io.FileInputStream, java.io.FileOutputStream, and reflection APIs
- Validate or sanitize user-provided expression strings before evaluation
- Implement authentication or authorization checks on the vulnerable endpoint
This design flaw allows unrestricted access to Java's filesystem APIs through the expression evaluation mechanism.
Attack Vector
The attack is executed remotely over the network by sending crafted HTTP requests to the /snail-job/workflow/check-node-expression endpoint. An attacker constructs a malicious QLExpress expression that:
- Instantiates Java File class objects to reference arbitrary filesystem paths
- Uses file I/O classes to read sensitive files such as configuration files, credentials, or system information
- Writes malicious content to accessible locations, potentially enabling further exploitation such as web shell deployment or configuration tampering
The vulnerability allows attackers to traverse the filesystem and access any files readable by the application server process, as well as create or modify files in writable locations. This can lead to sensitive data disclosure, configuration manipulation, or serve as a stepping stone for achieving remote code execution through file write primitives.
For detailed technical information about the exploitation mechanism, refer to the GitHub Documentation on QLExpress and the GitHub Gist Resource.
Detection Methods for CVE-2025-66916
Indicators of Compromise
- Unusual HTTP requests targeting /snail-job/workflow/check-node-expression endpoint
- Log entries containing QLExpress expressions with File class references or I/O operations
- Unexpected file access patterns in application server logs indicating reads of sensitive files such as /etc/passwd, configuration files, or credential stores
- Creation of new files in web-accessible directories or temporary folders by the application process
Detection Strategies
- Implement web application firewall (WAF) rules to detect and block requests containing suspicious QLExpress expressions with File class instantiation patterns
- Deploy endpoint detection and response (EDR) solutions to monitor for anomalous file access by Java application processes
- Configure intrusion detection systems (IDS) to alert on HTTP requests to the vulnerable endpoint containing potentially malicious expression patterns
- Review application logs for failed or successful expression evaluations that reference filesystem paths
Monitoring Recommendations
- Enable detailed access logging for all requests to the snailjob workflow endpoints
- Monitor file integrity on critical system files and application configurations to detect unauthorized modifications
- Implement real-time alerting for requests containing QLExpress expressions that attempt to access sensitive file paths
- Track and alert on file operations performed by the application server process outside of expected directories
How to Mitigate CVE-2025-66916
Immediate Actions Required
- Restrict access to the /snail-job/workflow/check-node-expression endpoint through network segmentation or firewall rules
- Implement authentication and authorization requirements on all workflow-related endpoints
- Deploy WAF rules to block requests containing QLExpress expressions with dangerous class references
- Audit application logs to identify any potential exploitation attempts and assess if compromise has occurred
Patch Information
Organizations using RuoYi-Vue-Plus should monitor the official Gitee Project Repository for security updates and patch releases addressing this vulnerability. Upgrade to a patched version as soon as one becomes available from the maintainers.
Workarounds
- Disable the vulnerable /snail-job/workflow/check-node-expression endpoint if the workflow expression validation feature is not required for business operations
- Implement a custom QLExpress sandbox that restricts access to dangerous Java classes including java.io.File, java.io.FileInputStream, java.io.FileOutputStream, and reflection APIs
- Add input validation to reject expressions containing references to file I/O classes before they are evaluated
- Deploy the application behind a reverse proxy that filters and blocks malicious expression patterns in request bodies
# Example: Restrict access to vulnerable endpoint via nginx
location /snail-job/workflow/check-node-expression {
# Block public access - only allow from internal management network
allow 10.0.0.0/8;
deny all;
# Alternatively, require authentication
# auth_basic "Restricted Access";
# auth_basic_user_file /etc/nginx/.htpasswd;
}
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


