APScheduler's JSONSerializer and CBORSerializer are vulnerable to Remote Code Execution (RCE) via Insecure Deserialization
CVE-2026-31072 · GHSA-9cfw-f3f9-7mm7 · PYSEC-2026-282 · published 19 May 2026
How serious is it
- Severity: critical, CVSS score 9.8 out of 10.
- No exploit prediction (EPSS) score yet.
- Not on the CISA list of exploited vulnerabilities.
- No public exploit in Exploit-DB.
Is your app affected by CVE-2026-31072?
Paste this prompt into Claude Code, Cursor or any AI coding tool: it runs a free Shippable scan of your project and fixes what it finds. Built with Lovable, Bolt or v0? Scan your live app. Or upload your package file.
Who is affected
apscheduler(PyPI) >= 4.0.0a1, <= 4.0.0a6
How to check
- Run
pip show apschedulerin your project to see the installed version, including copies pulled in by other packages. - Or paste your lockfile into the checker: it lists every package with a known vulnerability, this one included.
- Or run
npx shippable-dev scan localhost:3000in your project folder. It reads your lockfile and flags this vulnerability along with every other known one.
How to fix
Copies a prompt for Claude Code, Cursor or Codex: it checks your lockfiles for this and upgrades it.
- No fixed version of
apscheduleryet. Replace or remove it, or apply the workaround in the advisory below. - If a vulnerable version was live, check your logs and rotate the secrets that server could read.
The advisory
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
Check your whole app
Dependencies are only half of it. Free and read-only: before you push, run npx shippable-dev scan localhost:3000 in your project folder, no account needed. For your live app, you prove it's yours with a one-line tag first.
References
- nvd.nist.gov/vuln/detail/CVE-2026-31072
- gist.github.com/nedlir/11fb77f35a59cbba73392a086b02a9c6
- access.redhat.com/security/cve/CVE-2026-31072
- bugzilla.redhat.com/show_bug.cgi?id=2479907
- github.com/pypa/advisory-database/tree/main/vulns/apscheduler/PYSEC-2026-282.yaml
- pypi.org/project/apscheduler
- security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31072.json
- github.com/advisories/GHSA-9cfw-f3f9-7mm7
- github.com/agronholm/apscheduler
Merged from GitHub Advisory Database, OSV. Last updated 28 Oct 2026. All vulnerabilities · RSS · JSON