CVE-2022-0543: Debian-specific Redis Server Lua Sandbox Escape Vulnerability
Redis is prone to a (Debian-specific) Lua sandbox escape, which could result in remote code execution.
CVE-2022-0543 is a Debian-specific vulnerability in Redis servers that allows a Lua sandbox escape and can lead to remote code execution. It matters because Redis is widely used for caching, session storage, and messaging; a successful escape can give an attacker control over the host process and potentially the wider system. Organizations running Redis packages built for Debian (or derivatives that ship the same packaging) should treat this as a priority until they confirm they are not exposed.
CISA describes the issue as a Lua sandbox escape that could result in remote code execution. Public detail on exact packaging and configurations is limited; always confirm affected packages and fixed versions against the vendor advisory for your distribution.
How it works
The weakness is catalogued as CWE-862 (Missing Authorization). In this case it manifests as a failure to properly confine Lua scripts executed by the Redis server on certain Debian-packaged builds. Redis allows clients to run Lua scripts for atomic operations. When the sandbox that is supposed to restrict those scripts can be escaped, an attacker who can submit crafted Lua can break out of the intended isolation and execute code with the privileges of the Redis process.
Abuse therefore depends on the attacker being able to reach a vulnerable Redis instance and invoke the Lua scripting interface. No further exploit mechanics are provided in the available facts; treat any public proof-of-concept material with caution and validate behaviour only in controlled lab environments against the official advisory.
Am I affected? How to find it in your systems
This issue is specific to Redis servers packaged for Debian. Typical locations include bare-metal or virtual Linux hosts, containers, and cloud images that install Redis via Debian or Debian-derived package repositories. Inventory steps:
- Identify hosts and images running Redis: package queries (for example dpkg/apt on Debian-family systems), configuration management inventories, container image scans, and service discovery.
- Confirm the package origin and version string; Debian-specific builds are the ones called out. Compare against the fixed packages listed in the vendor/distribution advisory—do not rely on generic upstream Redis version numbers alone.
- Check whether the Lua scripting feature is enabled and whether the Redis port (or any authenticated/unauthenticated listener) is reachable from untrusted networks.
- Review logs and telemetry for unexpected SCRIPT or EVAL-family commands, sudden process spawns from the Redis user, or anomalous outbound connections originating from the Redis process. Absence of such signs does not prove safety; it only informs prioritization.
If you cannot determine package provenance, assume potential exposure until the advisory confirms otherwise.
How to remediate
Patch first. Apply the updates provided by your vendor or distribution exactly as instructed in the advisory (CISA’s required action is to apply updates per vendor instructions). After upgrading:
- Restart the Redis service so the new binaries are loaded.
- Verify the running package version matches the fixed release.
- Re-enable only the minimum necessary Redis modules and scripting features; disable Lua scripting if your workload does not require it.
- Enforce authentication, bind Redis to trusted interfaces only, and place it behind network controls so that only authorized application tiers can reach it.
- Run Redis as an unprivileged user with a tight filesystem and capability set, and keep the host patched.
These steps harden the service against both this sandbox-escape class and related authorization weaknesses.
If you can't patch immediately
Until the vendor update can be applied, reduce risk with compensating controls:
- Network segmentation: restrict access to the Redis port to only the specific application hosts that need it; block it from the internet and from general workstation subnets.
- Disable or tightly control the Lua scripting interface if operationally feasible.
- Virtual patching or WAF/IPS rules that detect and block suspicious SCRIPT/EVAL payloads, if your security stack supports Redis-aware inspection—tune carefully to avoid breaking legitimate traffic.
- Strengthen authentication and, where supported, TLS for client connections; remove any anonymous access.
- Heighten monitoring: alert on Lua-related commands, privilege-escalation indicators, and unexpected child processes or network connections from the Redis daemon.
- Consider temporary replacement with a non-vulnerable Redis build or an alternative cache only if you can validate functional and licensing compatibility.
These measures buy time; they are not a substitute for the official update.
If your data may have been exposed
Actively exploited vulnerabilities can lead to full host compromise and subsequent data theft or ransomware, although ransomware use is not documented for this CVE. If you have evidence of exploitation or cannot rule out exposure, follow your incident-response process: isolate affected hosts, preserve volatile evidence, rotate credentials and secrets that Redis may have held, and assess downstream systems. You can also run a free exposure scan of your email addresses against known breach datasets to check whether associated accounts appear in prior public breaches while you complete containment and recovery.
AICompiled with AI assistance from public sources and published under our editorial standards.