CVE-2021-23727 Stored Command Injection
An attacker with backend access can inject commands via task metadata, leading to remote code execution in applications using Celery.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-23727?
CVE-2021-23727 is a high-severity command injection vulnerability in Fedoraproject Extra Packages for Enterprise Linux, published on 29 Dec 2021. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
This affects the package celery before 5.2.2. It by default trusts the messages and metadata stored in backends (result stores). When reading task metadata from the backend, the data is deserialized. Given that an attacker can gain access to, or somehow manipulate the metadata within a celery backend, they could trigger a stored command injection vulnerability and potentially gain further access to the system.
Weakness: CWE-77
Which versions are affected by CVE-2021-23727?
3 open source packages ship an affected version, including celery. It affects 3 products.
| Package | Affected | Fixed in |
|---|---|---|
celery PyPI | All versions | 5.2.2 |
celery PyPI | All versions | 5.2.2 |
celery PyPI | All versions | 5.2.2 |
Products include Celeryproject Celery, Fedoraproject Extra Packages for Enterprise Linux, Fedoraproject Fedora.
How do I fix CVE-2021-23727?
Upgrade celery to 5.2.2 or later.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2021-23727 being exploited?
There is no known exploitation of CVE-2021-23727 in the wild and no public exploit code.
Other vulnerabilities in Fedoraproject Extra Packages for Enterprise Linux
All Fedoraproject Extra Packages for Enterprise Linux vulnerabilities
Sources
Also known as CLSA-2025-1756771909, CLSA-2026-1770250308, DEBIAN-CVE-2021-23727, GHSA-q4xr-rc97-m4xx, MGASA-2022-0029, PYSEC-2021-858 and 2 more.