{"id":"CVE-2025-62515","kind":"vulnerability","aliases":["CVE-2025-62515","GHSA-f74j-gffq-vm9p"],"related":[],"title":"pyquokka is Vulnerable to Remote Code Execution by Pickle Deserialization via FlightServer","description":"### Description\n\nIn the FlightServer class of the pyquokka framework, the do_action() method directly uses pickle.loads() to deserialize action bodies received from Flight clients without any sanitization or validation, which results in a remote code execution vulnerability. The vulnerable code is located in pyquokka/flight.py at line 283, where arbitrary data from Flight clients is directly passed to pickle.loads().\n\nEven more concerning, when FlightServer is configured to listen on 0.0.0.0 (as shown in the provided server example at line 339), this allows attackers across the entire network to perform arbitrary remote code execution by sending malicious pickled payloads through the set_configs action.\n\nIn addition, the functions cache_garbage_collect, do_put, and do_get also contain vulnerability points where pickle.loads is used to deserialize untrusted remote data. Please review and fix these issues accordingly. This report uses the set_configs action as an example.\n\n\n### Proof of Concept\n\n* Step 1:\nThe victim user starts a FlightServer that binds to the network interface, e.g.:\n```\nserver = FlightServer(\"0.0.0.0\", location = \"grpc+tcp://0.0.0.0:5005\")\nserver.serve()\n````\n* Step 2:\nThe attacker can then send malicious pickle dump data through the Flight client connection. The provided PoC demonstrates how an attacker can execute \"ls -l\" command:\n\n```python\nclass RCE:\ndef __reduce__(self):\nimport os\nreturn (os.system, ('ls -l',))\n\nimport pickle\naction_body = pickle.dumps(RCE())\naction = pyarrow.flight.Action(\"set_configs\", action_body)\n```\n\nWhen the server receives this payload, the FlightServer.do_action() method calls pickle.loads(action.body.to_pybytes()) on line 283, which triggers the execution of the malicious code through Python's pickle deserialization mechanism. The provided flight_client.py demonstrates a complete PoC that connects to the vulnerable server and executes arbitrary commands through the pickle deserialization vulnerability.\n\nWhen the vulnerability is reproduced, python flight.py can be run to init the server and then run flight_client.py. There is an attack demo in the attachment.\n\n### Impact\n\nRemote code execution on the victim's machine over the network. Once the victim starts the FlightServer with network binding (especially 0.0.0.0), an attacker on the network can gain arbitrary code execution by connecting to the Flight endpoint and sending crafted pickle payloads through the set_configs action. This vulnerability allows for:\n\n- Complete system compromise\n- Data exfiltration\n- Lateral movement within the network\n- Denial of service attacks\n- Installation of persistent backdoors\n\n### Mitigation\n\n1. **Replace unsafe deserialization**: Replace `pickle.loads()` with safer alternatives such as:\n   - JSON serialization for simple data structures\n   - Protocol Buffers or MessagePack for complex data\n   - If pickle must be used, implement a custom `Unpickler` with a restricted `find_class()` method that only allows whitelisted classes\n\n2. **Network security**: \n   - If the service is intended for internal use only, bind to localhost (`127.0.0.1`) instead of `0.0.0.0`\n   - Implement authentication and authorization mechanisms\n\n3. **Security warnings**: When starting the service on public interfaces, display clear security warnings to inform users about the risks.","summary":"pyquokka's FlightServer passes data sent by Flight clients straight to pickle.loads() in do_action, with no validation. A remote client can send a crafted pickle payload and run arbitrary commands on the server.","severity":"critical","cvss":9.8,"epss":0.0089,"exploited":false,"exploited_at":null,"products":[{"name":"pyquokka","fixed":[],"affected":"<= 0.3.1","ecosystem":"pypi"}],"ecosystems":["pypi"],"tags":["cwe-502","package","pyarrow-flight","pyquokka","python","self-hosted"],"not_affected_if":["flight-server-not-used","localhost-only-binding"],"how_to_check":"- Check whether `pyquokka` is installed and at what version: `pip show pyquokka`\n- Look for a `FlightServer` started with a `0.0.0.0` host in your code or deployment config\n- Check whether the Flight port (for example `grpc+tcp://0.0.0.0:5005`) is reachable from other machines","fix":"- pyquokka: affected `<= 0.3.1`; fixed version not stated in the sources","status":"open","published_at":"2025-10-17T18:08:09+00:00","first_seen_at":"2026-11-16T16:13:26+00:00","triaged_at":"2026-11-16T16:15:15+00:00","updated_at":"2026-11-16T16:15:15+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-11-16T16:15:15Z","model":"claude-haiku-5-5","output":{"fix":"- pyquokka: affected `<= 0.3.1`; fixed version not stated in the sources","reach":"network","title":"pyquokka: Flight server unpickles network data, allowing remote code execution","impact":"high","summary":"pyquokka's FlightServer passes data sent by Flight clients straight to pickle.loads() in do_action, with no validation. A remote client can send a crafted pickle payload and run arbitrary commands on the server.","audience":"developers","category":"package","nicknames":[],"who_cares":["pyquokka","python","pyarrow-flight","self-hosted"],"confidence":0.8,"fix_status":"unknown","needs_auth":"no","worst_case":"Attacker runs arbitrary commands on the server through a crafted pickle","analyst_note":"","how_to_check":"- Check whether `pyquokka` is installed and at what version: `pip show pyquokka`\n- Look for a `FlightServer` started with a `0.0.0.0` host in your code or deployment config\n- Check whether the Flight port (for example `grpc+tcp://0.0.0.0:5005`) is reachable from other machines","plain_action":"","product_name":"","needs_analyst":false,"not_affected_if":["localhost-only-binding","flight-server-not-used"],"who_is_affected":"Any application that runs pyquokka's FlightServer and exposes its port beyond the local machine is exposed, because the flaw is reached by sending a payload to the set_configs action over the network. Installations that bind the server only to 127.0.0.1 or do not run FlightServer at all are not reachable this way, though the advisory notes that the same pickle.loads use appears in cache_garbage_collect, do_put and do_get.","user_interaction":"no","product_ecosystem":"","needs_special_setup":"yes","severity_if_unknown":"critical"},"cost_usd":0.000883,"input_tokens":5674,"output_tokens":631,"severity_before":"critical"},"analyst_status":null,"analyst_note":null,"search":"'-2025':14A,22A '-502':26B '-62515':15A,23A '0.0.0.0':138C,234C,237C,393C,505C '1':218C,443C '127.0.0.1':502C '2':241C,487C '283':116C,308C '3':511C '339':148C '5005':238C 'accord':203C 'across':152C 'action':50B,81C,88C,171C,210C,282C,286C,290C,300C,419C 'action.body.to':304C 'addit':173C 'allow':150C,422C,484C 'also':184C 'altern':451C 'arbitrari':65B,118C,158C,338C,401C 'attach':370C 'attack':151C,243C,262C,366C,395C,437C 'authent':507C 'author':509C 'backdoor':441C 'bind':226C,391C,499C 'bodi':89C,283C,291C 'buffer':461C 'cach':176C 'call':302C 'class':74C,269C,480C,486C 'clear':522C 'client':44B,56B,93C,122C,254C 'code':6A,104C,109C,160C,316C,373C,402C 'collect':178C 'command':66B,267C,339C 'complet':328C,424C 'complex':465C 'compromis':426C 'concept':216C 'concern':130C 'config':170C,209C,289C,418C 'configur':134C 'connect':255C,331C,405C 'contain':185C 'craft':60B,412C 'custom':474C 'cve':13A,21A 'cwe':25B 'data':40B,119C,196C,250C,427C,458C,466C 'def':271C 'demo':367C 'demonstr':259C,326C 'denial':434C 'descript':70C 'deseri':10A,87C,193C,321C,343C,446C 'direct':83C,124C 'display':521C 'dump':249C 'e.g':231C 'endpoint':409C 'entir':154C 'especi':392C 'even':128C 'exampl':145C,213C 'execut':7A,105C,161C,264C,312C,337C,374C,403C 'exfiltr':428C 'f74j':18A 'find':479C 'fix':200C 'flight':30B,43B,92C,121C,253C,408C 'flight.py':351C 'flight_client.py':325C,362C 'flightserv':12A,38B,73C,132C,224C,233C,388C 'flightserver.do':299C 'framework':78C 'function':175C 'gain':400C 'garbag':177C 'get':183C 'gffq':19A 'ghsa':17A 'ghsa-f74j-gffq-vm9p':16A 'grpc':236C 'host':35B 'impact':371C 'implement':472C,506C 'import':274C,280C 'inform':526C 'init':356C 'instal':438C 'instead':503C 'intend':494C 'interfac':230C,520C 'intern':496C 'issu':202C 'json':454C 'l':266C,279C 'later':429C 'line':115C,147C,307C 'listen':136C 'localhost':501C 'locat':111C,235C 'ls':265C,278C 'machin':379C 'malici':164C,247C,315C 'mechan':322C,510C 'messagepack':463C 'method':82C,301C,481C 'mitig':442C 'movement':430C 'must':469C 'network':155C,229C,382C,390C,398C,433C,488C 'os':275C 'os.system':277C 'packag':27B 'pass':39B,125C 'payload':62B,166C,297C,414C 'perform':157C 'persist':440C 'pickl':9A,61B,165C,248C,281C,320C,342C,413C,468C 'pickle.dumps':284C 'pickle.loads':47B,85C,127C,189C,303C,448C 'pleas':197C 'poc':258C,329C 'point':187C 'proof':214C 'protocol':460C 'provid':143C,257C,324C 'public':519C 'put':180C 'pyarrow':29B 'pyarrow-flight':28B 'pyarrow.flight.action':287C 'pybyt':305C 'pyquokka':1A,24A,31B,36B,77C 'pyquokka/flight.py':113C 'python':32B,268C,318C,350C 'rce':270C,285C 'receiv':90C,295C 'reduc':272C 'remot':5A,55B,103C,159C,195C,372C 'replac':444C,447C 'report':205C 'reproduc':349C 'restrict':478C 'result':100C 'return':276C 'review':198C 'risk':530C 'run':64B,354C,361C 'safer':450C 'sanit':96C 'secur':489C,512C,523C 'self':34B,273C 'self-host':33B 'send':58B,163C,246C,411C 'sent':41B 'serial':455C 'server':69B,144C,232C,294C,335C,358C 'server.serve':239C 'servic':436C,492C,517C 'set':169C,208C,288C,417C 'shown':140C 'simpl':457C 'start':222C,386C,515C 'step':217C,240C 'straight':45B 'structur':459C 'system':425C 'trigger':310C 'unpickl':475C 'unsaf':445C 'untrust':194C 'use':84C,191C,206C,471C,497C 'user':221C,527C 'valid':53B,98C 'via':11A 'victim':220C,377C,385C 'vm9p':20A 'vulner':3A,106C,108C,186C,334C,344C,347C,421C 'warn':513C,524C 'whitelist':485C 'within':431C 'without':94C","nicknames":[],"mitigations":[],"who_affected":"Any application that runs pyquokka's FlightServer and exposes its port beyond the local machine is exposed, because the flaw is reached by sending a payload to the set_configs action over the network. Installations that bind the server only to 127.0.0.1 or do not run FlightServer at all are not reachable this way, though the advisory notes that the same pickle.loads use appears in cache_garbage_collect, do_put and do_get.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":["pyquokka"],"ptokens":["pyquokka"],"labels":["critical","cwe502","package","pyarrowflight","pypi","pyquokka","python","selfhosted"],"campaign_type":null,"search_a":"'-2025':14A,22A '-62515':15A,23A 'code':6A 'cve':13A,21A 'deseri':10A 'execut':7A 'f74j':18A 'flightserv':12A 'gffq':19A 'ghsa':17A 'ghsa-f74j-gffq-vm9p':16A 'pickl':9A 'pyquokka':1A,24A 'remot':5A 'via':11A 'vm9p':20A 'vulner':3A","search_b":"'-502':26B 'action':50B 'arbitrari':65B 'client':44B,56B 'command':66B 'craft':60B 'cwe':25B 'data':40B 'flight':30B,43B 'flightserv':38B 'host':35B 'packag':27B 'pass':39B 'payload':62B 'pickl':61B 'pickle.loads':47B 'pyarrow':29B 'pyarrow-flight':28B 'pyquokka':31B,36B 'python':32B 'remot':55B 'run':64B 'self':34B 'self-host':33B 'send':58B 'sent':41B 'server':69B 'straight':45B 'valid':53B","search_c":"'0.0.0.0':138C,234C,237C,393C,505C '1':218C,443C '127.0.0.1':502C '2':241C,487C '283':116C,308C '3':511C '339':148C '5005':238C 'accord':203C 'across':152C 'action':81C,88C,171C,210C,282C,286C,290C,300C,419C 'action.body.to':304C 'addit':173C 'allow':150C,422C,484C 'also':184C 'altern':451C 'arbitrari':118C,158C,338C,401C 'attach':370C 'attack':151C,243C,262C,366C,395C,437C 'authent':507C 'author':509C 'backdoor':441C 'bind':226C,391C,499C 'bodi':89C,283C,291C 'buffer':461C 'cach':176C 'call':302C 'class':74C,269C,480C,486C 'clear':522C 'client':93C,122C,254C 'code':104C,109C,160C,316C,373C,402C 'collect':178C 'command':267C,339C 'complet':328C,424C 'complex':465C 'compromis':426C 'concept':216C 'concern':130C 'config':170C,209C,289C,418C 'configur':134C 'connect':255C,331C,405C 'contain':185C 'craft':412C 'custom':474C 'data':119C,196C,250C,427C,458C,466C 'def':271C 'demo':367C 'demonstr':259C,326C 'denial':434C 'descript':70C 'deseri':87C,193C,321C,343C,446C 'direct':83C,124C 'display':521C 'dump':249C 'e.g':231C 'endpoint':409C 'entir':154C 'especi':392C 'even':128C 'exampl':145C,213C 'execut':105C,161C,264C,312C,337C,374C,403C 'exfiltr':428C 'find':479C 'fix':200C 'flight':92C,121C,253C,408C 'flight.py':351C 'flight_client.py':325C,362C 'flightserv':73C,132C,224C,233C,388C 'flightserver.do':299C 'framework':78C 'function':175C 'gain':400C 'garbag':177C 'get':183C 'grpc':236C 'impact':371C 'implement':472C,506C 'import':274C,280C 'inform':526C 'init':356C 'instal':438C 'instead':503C 'intend':494C 'interfac':230C,520C 'intern':496C 'issu':202C 'json':454C 'l':266C,279C 'later':429C 'line':115C,147C,307C 'listen':136C 'localhost':501C 'locat':111C,235C 'ls':265C,278C 'machin':379C 'malici':164C,247C,315C 'mechan':322C,510C 'messagepack':463C 'method':82C,301C,481C 'mitig':442C 'movement':430C 'must':469C 'network':155C,229C,382C,390C,398C,433C,488C 'os':275C 'os.system':277C 'pass':125C 'payload':166C,297C,414C 'perform':157C 'persist':440C 'pickl':165C,248C,281C,320C,342C,413C,468C 'pickle.dumps':284C 'pickle.loads':85C,127C,189C,303C,448C 'pleas':197C 'poc':258C,329C 'point':187C 'proof':214C 'protocol':460C 'provid':143C,257C,324C 'public':519C 'put':180C 'pyarrow.flight.action':287C 'pybyt':305C 'pyquokka':77C 'pyquokka/flight.py':113C 'python':268C,318C,350C 'rce':270C,285C 'receiv':90C,295C 'reduc':272C 'remot':103C,159C,195C,372C 'replac':444C,447C 'report':205C 'reproduc':349C 'restrict':478C 'result':100C 'return':276C 'review':198C 'risk':530C 'run':354C,361C 'safer':450C 'sanit':96C 'secur':489C,512C,523C 'self':273C 'send':163C,246C,411C 'serial':455C 'server':144C,232C,294C,335C,358C 'server.serve':239C 'servic':436C,492C,517C 'set':169C,208C,288C,417C 'shown':140C 'simpl':457C 'start':222C,386C,515C 'step':217C,240C 'structur':459C 'system':425C 'trigger':310C 'unpickl':475C 'unsaf':445C 'untrust':194C 'use':84C,191C,206C,471C,497C 'user':221C,527C 'valid':98C 'victim':220C,377C,385C 'vulner':106C,108C,186C,334C,344C,347C,421C 'warn':513C,524C 'whitelist':485C 'within':431C 'without':94C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2025-10-17T16:08:26+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-f74j-gffq-vm9p","url":"https://github.com/advisories/GHSA-f74j-gffq-vm9p","severity":"critical","published_at":"2025-10-17T18:08:09+00:00","modified_at":"2026-11-16T16:11:33+00:00","first_seen_at":"2026-11-16T16:13:26+00:00","fetched_at":"2026-11-16T16:17:15+00:00","note":null},{"source":"nvd","external_id":"CVE-2025-62515","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-62515","severity":null,"published_at":"2025-10-17T21:15:36+00:00","modified_at":"2026-10-08T22:10:00+00:00","first_seen_at":"2026-11-16T16:38:06+00:00","fetched_at":"2026-11-16T16:38:06+00:00","note":null}],"documents":[{"id":171152,"url":"https://api.github.com/repos/marsupialtail/quokka/security-advisories/GHSA-f74j-gffq-vm9p","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":171153,"url":"https://github.com/marsupialtail/quokka/security/advisories/GHSA-f74j-gffq-vm9p","title":"Maintainer's advisory: github.com","kind":"vendor","source":"ghsa","publisher":"vendor","text":null,"published_at":"2025-10-17T16:08:26+00:00","relation":"advisory","confidence":null,"note":"Maintainer's advisory: github.com"}],"disclosures":[],"exploit_sources":[{"type":"epss","score":0.0089,"url":"https://api.first.org/data/v1/epss?cve=CVE-2025-62515"}],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}