{"id":"CVE-2026-31072","kind":"vulnerability","aliases":["CVE-2026-31072","GHSA-9cfw-f3f9-7mm7"],"related":[],"title":"APScheduler's JSONSerializer and CBORSerializer are vulnerable to Remote Code Execution (RCE) via Insecure Deserialization","description":"The JSONSerializer and CBORSerializer in APScheduler (all versions including 3.10.x and 4.0.0a5) are vulnerable to Remote Code Execution (RCE) via Insecure Deserialization. The unmarshal_object function allows for arbitrary class instantiation and state injection by dynamically importing modules and calling __setstate__ on any class available in the Python environment. An attacker can exploit this by submitting a specially crafted JSON or CBOR payload to an application using these serializers","summary":"APScheduler 4.0 alpha releases deserialize job data with JSONSerializer and CBORSerializer, which import arbitrary modules and call __setstate__ on any class in the environment. An attacker who can submit a crafted JSON or CBOR payload to an application using these serializers can execute code on the server.","severity":"critical","cvss":9.8,"epss":0.0081,"exploited":false,"exploited_at":null,"products":[{"name":"apscheduler","fixed":[],"affected":">= 4.0.0a1, <= 4.0.0a6","ecosystem":"pypi"}],"ecosystems":["pypi"],"tags":["apscheduler","cwe-502","package","python","self-hosted"],"not_affected_if":["default-config","no-untrusted-input"],"how_to_check":"- Run `pip show apscheduler` and check whether the version is between `4.0.0a1` and `4.0.0a6`\n- Search the project for `JSONSerializer` or `CBORSerializer` from `apscheduler` to see whether they are used\n- Check whether any externally supplied data reaches serialized scheduler job or event data","fix":"- Upgrade `apscheduler` past `4.0.0a6`; the fixed version is unknown from the sources\n- Until upgraded, avoid the JSON and CBOR serializers for data that comes from untrusted sources","status":"open","published_at":"2026-05-19T16:16:20+00:00","first_seen_at":"2026-10-27T15:59:48+00:00","triaged_at":"2026-10-27T16:00:28+00:00","updated_at":"2026-10-27T16:03:35+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-10-27T16:00:28Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade `apscheduler` past `4.0.0a6`; the fixed version is unknown from the sources\n- Until upgraded, avoid the JSON and CBOR serializers for data that comes from untrusted sources","reach":"unknown","title":"APScheduler: crafted JSON or CBOR job data runs code on deserialization","impact":"high","summary":"APScheduler 4.0 alpha releases deserialize job data with JSONSerializer and CBORSerializer, which import arbitrary modules and call __setstate__ on any class in the environment. An attacker who can submit a crafted JSON or CBOR payload to an application using these serializers can execute code on the server.","category":"package","nicknames":[],"who_cares":["python","apscheduler","self-hosted"],"confidence":0.7,"needs_auth":"unknown","worst_case":"Code runs on the server through crafted serialized payloads","analyst_note":"Confirm the fixed version and whether the 3.10.x line is truly affected, using the GHSA-9cfw-f3f9-7mm7 advisory page.","how_to_check":"- Run `pip show apscheduler` and check whether the version is between `4.0.0a1` and `4.0.0a6`\n- Search the project for `JSONSerializer` or `CBORSerializer` from `apscheduler` to see whether they are used\n- Check whether any externally supplied data reaches serialized scheduler job or event data","needs_analyst":true,"not_affected_if":["default-config","no-untrusted-input"],"who_is_affected":"Applications that use APScheduler 4.0 alpha releases with the JSONSerializer or CBORSerializer and that accept serialized payloads from users or other untrusted parties are exposed. The sources say the 3.10.x line is also listed as affected in the description, so check that version too. Teams that run APScheduler with the default serializer for internal, trusted data have less exposure.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"critical"},"cost_usd":0.000691,"input_tokens":3468,"output_tokens":689,"severity_before":"critical"},"analyst_status":null,"analyst_note":null,"search":"'-2026':17A,25A '-31072':18A,26A '-502':30B '3.10':92C '4.0':37B '4.0.0':95C '7mm7':23A '9cfw':21A 'a5':96C 'allow':111C 'alpha':38B 'applic':73B,150C 'apschedul':1A,28B,36B,88C 'apscheduler':27A 'arbitrari':49B,113C 'attack':61B,135C 'avail':129C 'call':52B,124C 'cbor':69B,146C 'cborseri':5A,46B,86C 'class':56B,114C,128C 'code':10A,79B,101C 'craft':66B,143C 'cve':16A,24A 'cwe':29B 'data':42B 'deseri':15A,40B,106C 'dynam':120C 'environ':59B,133C 'execut':11A,78B,102C 'exploit':137C 'f3f9':22A 'function':110C 'ghsa':20A 'ghsa-9cfw-f3f9-7mm7':19A 'host':35B 'import':48B,121C 'includ':91C 'inject':118C 'insecur':14A,105C 'instanti':115C 'job':41B 'json':67B,144C 'jsonseri':3A,44B,84C 'modul':50B,122C 'object':109C 'packag':31B 'payload':70B,147C 'python':32B,132C 'rce':12A,103C 'releas':39B 'remot':9A,100C 'self':34B 'self-host':33B 'serial':76B,153C 'server':82B 'setstat':53B,125C 'special':142C 'state':117C 'submit':64B,140C 'unmarsh':108C 'use':74B,151C 'version':90C 'via':13A,104C 'vulner':7A,98C 'x':93C","nicknames":[],"mitigations":[],"who_affected":"Applications that use APScheduler 4.0 alpha releases with the JSONSerializer or CBORSerializer and that accept serialized payloads from users or other untrusted parties are exposed. The sources say the 3.10.x line is also listed as affected in the description, so check that version too. Teams that run APScheduler with the default serializer for internal, trusted data have less exposure.","tier":"B","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-05-19T16:16:20+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-9cfw-f3f9-7mm7","url":"https://github.com/advisories/GHSA-9cfw-f3f9-7mm7","severity":"critical","published_at":"2026-05-19T18:32:11+00:00","modified_at":"2026-10-27T15:58:30+00:00","first_seen_at":"2026-10-27T15:59:48+00:00","fetched_at":"2026-10-27T16:10:07+00:00","note":null},{"source":"nvd","external_id":"CVE-2026-31072","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31072","severity":null,"published_at":"2026-05-19T16:16:20+00:00","modified_at":"2026-07-24T12:10:00+00:00","first_seen_at":"2026-10-27T16:03:35+00:00","fetched_at":"2026-10-27T16:03:35+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}