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
Published: 2026-05-19
Score: 9.8 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability exists in the JSONSerializer and CBORSerializer components of APScheduler. During deserialization, the unmarshal_object function can dynamically import any Python module and invoke its __setstate__ method, enabling an attacker to instantiate arbitrary classes and inject state that is then executed within the application context. This flaw is categorized as insecure deserialization and corresponds to CWE‑502. The result is the ability to run arbitrary code on the host that runs the application.

Affected Systems

Any Python application that imports the APScheduler library and utilizes the JSONSerializer or CBORSerializer, including all released 3.10.x versions and the experimental 4.0.0a5 build, is vulnerable. The flaw is present once the serializers are invoked; therefore any environment where APScheduler is installed and the serialization functionality is exposed is at risk.

Risk and Exploitability

The CVSS score of 9.8 marks this as a high‑severity issue. The EPSS score of 0.00061 indicates a very low probability of exploitation and the flaw is not yet listed in the CISA KEV catalog. Based on the description, the likely attack vector is remote network exploitation through an endpoint that accepts serialized data, though local exploitation is also possible if a user can supply a crafted payload to the application. The exploitation path is straightforward: deliver a malicious JSON or CBOR payload and the vulnerable deserializer will load and execute the attacker‑specified classes, resulting in full code execution on the target system. The potential impact is severe, warranting immediate attention.

Generated by OpenCVE AI on May 20, 2026 at 17:51 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade APScheduler to a patched release that removes support for insecure deserialization or includes the security fixes
  • If an upgrade is not viable, eliminate all uses of JSONSerializer or CBORSerializer in the application code and replace them with a trusted alternative such as Python’s built‑in json module with strict validation
  • Restrict the exposure of any deserialization endpoints, ensuring that only trusted, authenticated clients can send data, or sandbox the deserialization process in a separate, low‑privilege environment

Generated by OpenCVE AI on May 20, 2026 at 17:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-9cfw-f3f9-7mm7 APScheduler's JSONSerializer and CBORSerializer are vulnerable to Remote Code Execution (RCE) via Insecure Deserialization
History

Wed, 20 May 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}


Wed, 20 May 2026 11:45:00 +0000

Type Values Removed Values Added
First Time appeared Agronholm
Agronholm apscheduler
Vendors & Products Agronholm
Agronholm apscheduler

Wed, 20 May 2026 02:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-116

Wed, 20 May 2026 00:15:00 +0000

Type Values Removed Values Added
Title Insecure Deserialization in APScheduler Enabling Arbitrary Code Execution apscheduler: APScheduler: Remote Code Execution via Insecure Deserialization
References
Metrics threat_severity

None

cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

threat_severity

Important


Tue, 19 May 2026 17:15:00 +0000

Type Values Removed Values Added
Title Insecure Deserialization in APScheduler Enabling Arbitrary Code Execution
Weaknesses CWE-116
CWE-502

Tue, 19 May 2026 15:45:00 +0000

Type Values Removed Values Added
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
References

Subscriptions

Agronholm Apscheduler
cve-icon MITRE

Status: PUBLISHED

Assigner: mitre

Published:

Updated: 2026-05-20T15:46:40.527Z

Reserved: 2026-03-09T00:00:00.000Z

Link: CVE-2026-31072

cve-icon Vulnrichment

Updated: 2026-05-20T15:03:44.297Z

cve-icon NVD

Status : Deferred

Published: 2026-05-19T16:16:20.610

Modified: 2026-05-20T17:16:20.947

Link: CVE-2026-31072

cve-icon Redhat

Severity : Important

Publid Date: 2026-05-19T00:00:00Z

Links: CVE-2026-31072 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-05-20T18:00:14Z

Weaknesses
  • CWE-502

    Deserialization of Untrusted Data