CVE-2025-49844 Remediation Guide
Vulnerability Background
Authenticated users can use specially crafted Lua scripts to manipulate the garbage collector, triggering a use-after-free condition and potentially leading to remote code execution (RCE).
Affected versions: all Redis kernel versions earlier than 4.0.14.27, 5.0.14.10, and 6.2.20.0.
Vulnerability Analysis
The Redis vulnerability can be triggered only when all of the following conditions are met:
- DCS Redis instances can be accessed from the Internet.
- Password-free access is enabled or instance passwords are leaked.
Vulnerability Scanning
- Check whether DCS instances can be accessed from the Internet.
On the details page of an instance, check whether public access is enabled. If it is disabled, the instance cannot be accessed from the Internet. If it is enabled, the instance can be accessed from the Internet and may be vulnerable to malicious attacks.
- Check whether there are instances that support password-free access (test by accessing the Web CLI without entering a password) or instances whose passwords may be leaked. If no, no security risk is involved. If yes, perform the subsequent steps.
Password test for connecting to Redis through the Web CLI: Click Connect to Redis. If the Web CLI page is displayed, the instance supports password-free access. If a password is required, you need to enter the password to access the Web CLI.
Figure 1 Connecting to Redis
Figure 2 Web CLI
Figure 3 Login page
Vulnerability Mitigation
- If there are users who can access the instances from the Internet, enable the whitelist configuration or temporarily disable public access. Figure 4 Whitelist configuration
- If password-free access is enabled or instance passwords are leaked, enable password authentication or change the passwords in a timely manner. Figure 5 Resetting a password
Figure 6 Changing a password
Solution
- Perform a version upgrade to fix the vulnerability.
- New instances created after the fixed version is deployed will automatically be free of the vulnerability.
- Historical instances require a minor version upgrade.
Figure 7 Minor version upgrade for an instance
- Disable commands by renaming them.
The original execution statements of the involved services need to be modified. After the configuration, the services need to be restarted, which may cause service interruption. Therefore, this method is not recommended.
- Application scope: single-node, master/standby, and Redis Cluster DCS Redis 4.0, 5.0, or 6.0 instances
Example:
- Access /opt/dcs/data/{instance_ID-ip-port}/ and check the Redis command disabling file on an instance node.
disable_cmd_list.conf
Figure 8 Example figure
- Add command renaming information to the disable_cmd_list.conf file.
rename-command EVAL EVAL123 rename-command EVALSHA EVALSHA123
Figure 9 Example figure
Alternatively, you can use an empty string to disable the command. After the command is disabled, it is unavailable.
rename-command EVAL '' rename-command EVALSHA ''
Figure 10 Example figure
Figure 11 Example figure
Note:
You need to access all nodes one by one and perform the preceding operations. After the command renaming information is added on all nodes, restart the instance to apply the configuration. (Services will be interrupted if the client lacks a reconnection mechanism.)
Risk:
During the command renaming information injection process in command-line modification mode, if rename-command is incorrectly entered, the nodes will fail to start after the instance is restarted. Additionally, if the node access modification is incomplete, there is a risk that command renaming will not be applied on the new master node after a master/standby switchover.
- Access /opt/dcs/data/{instance_ID-ip-port}/ and check the Redis command disabling file on an instance node.
- Application scope: Proxy Cluster and read/write splitting DCS Redis 4.0, 5.0, or 6.0 instances
Example:
Add command renaming information to the proxy.conf file.
proxy-rename-commands eval:eval123,evalsha:evalsha123
Figure 12 Example figure
Note:
You need to access all proxy nodes one by one and perform the preceding operations. After the command renaming information is added on all nodes, restart the instance to apply the configuration. (Services will be interrupted if the client lacks a reconnection mechanism.)
Risk:
During the command renaming information injection process in command-line modification mode, if rename-command is incorrectly entered, the nodes will fail to start after the instance is restarted. Additionally, if the node access modification is incomplete, there is a risk that command renaming will not be applied on the new master node after a master/standby switchover.
- Application scope: single-node and master/standby DCS Redis 3.0 instances
The procedure is the same as that in 2.a. The difference is that the modification path is /opt/dcs/redis/redis/disable_cmd_list.conf.
Figure 13 Example figure
Note:
You need to access all nodes one by one and perform the preceding operations. After the command renaming information is added on all nodes, restart the instance to apply the configuration. (Services will be interrupted if the client lacks a reconnection mechanism.)
Risk:
During the command renaming information injection process in command-line modification mode, if rename-command is incorrectly entered, the nodes will fail to start after the instance is restarted. Additionally, if the node access modification is incomplete, there is a risk that command renaming will not be applied on the new master node after a master/standby switchover.
- Application scope: single-node, master/standby, and Redis Cluster DCS Redis 4.0, 5.0, or 6.0 instances
Appendix
- Search for the names of all large-specs VMs on Service OM. Figure 14 Redis 4.0/5.0 physical resources
- Log in to the DCS-Server-01 node and run the script to switch to a large-specs VM.
cd /opt/cloud/DCS-Server/bin python login_bms.py ${bare_vm_name}Figure 15 Example figure
- Run the following statement to check the execution status of EVAL or EVALSHA:
grep cmdstat_ eval /opt/dcs/data/*/info/*-00-00-00.data
Figure 16 Example figure
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot