PYSEC-2026-282
Vulnerability from pysec - Published: 2026-06-29 11:50 - Updated: 2026-07-01 20:22The 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
| Name | purl | apscheduler | pkg:pypi/apscheduler |
|---|
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "apscheduler",
"purl": "pkg:pypi/apscheduler"
},
"ranges": [
{
"events": [
{
"introduced": "4.0.0a1"
},
{
"last_affected": "4.0.0a6"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"4.0.0a1",
"4.0.0a2",
"4.0.0a3",
"4.0.0a4",
"4.0.0a5",
"4.0.0a6"
]
}
],
"aliases": [
"CVE-2026-31072",
"GHSA-9cfw-f3f9-7mm7"
],
"details": "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",
"id": "PYSEC-2026-282",
"modified": "2026-07-01T20:22:49.421836Z",
"published": "2026-06-29T11:50:49.946441Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-31072"
},
{
"type": "WEB",
"url": "https://gist.github.com/nedlir/11fb77f35a59cbba73392a086b02a9c6"
},
{
"type": "PACKAGE",
"url": "https://github.com/agronholm/apscheduler"
},
{
"type": "PACKAGE",
"url": "https://pypi.org/project/apscheduler"
},
{
"type": "ADVISORY",
"url": "https://github.com/advisories/GHSA-9cfw-f3f9-7mm7"
}
],
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "APScheduler\u0027s JSONSerializer and CBORSerializer are vulnerable to Remote Code Execution (RCE) via Insecure Deserialization"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.