Skip to content

Commit b2bd264

Browse files
docs(security): why the APScheduler 4 advisory does not reach this adapter (#43)
1 parent e471664 commit b2bd264

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

‎SECURITY.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,19 @@
77
| the latest release | ✅ fixes ship as the next patch or minor |
88
| older | ❌ upgrade to the latest release first |
99

10+
## Known advisories in dependencies
11+
12+
| Advisory | Where | Status |
13+
|---|---|---|
14+
| APScheduler 4 `JSONSerializer` / `CBORSerializer` deserialize job data without validating it | the `apscheduler4` extra, every published 4.x alpha | not reachable from `servicewright` |
15+
16+
There is no patched APScheduler 4 to upgrade to — `4.0.0a6` is both the newest release and a
17+
vulnerable one. The adapter does not reach the affected code: it builds `AsyncScheduler()` with
18+
no arguments, so the job store is the in-memory one that serializes nothing, and neither
19+
`ScheduledJob` nor the entrypoint accepts a data store or a serializer. A caller who builds
20+
their own scheduler with a persistent job store owns that risk; see
21+
[the scheduler adapter](https://bedrock-python.github.io/servicewright/adapters/scheduler/).
22+
1023
## Reporting a vulnerability
1124

1225
**Please do not report security vulnerabilities via public GitHub Issues.**

‎docs/adapters/scheduler.md‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,22 @@ One field differs, because APScheduler itself changed it:
178178
installed. That is also why the `all` extra bundles `apscheduler4` and excludes
179179
`apscheduler3`.
180180

181+
!!! danger "GHSA: APScheduler 4 serializers, and why this adapter is not affected"
182+
183+
Every published APScheduler 4 release is an alpha, and all of them carry an unpatched
184+
advisory: `JSONSerializer` and `CBORSerializer` deserialize job data without validating
185+
it, which is remote code execution for anyone who can write to the job store. There is no
186+
fixed version to upgrade to.
187+
188+
This adapter never reaches that code. It constructs `AsyncScheduler()` with no arguments —
189+
the default in-memory job store, which serializes nothing — and it exposes no way to pass a
190+
data store or a serializer in: `ScheduledJob` describes jobs, not storage. Nothing in
191+
`servicewright` imports a serializer.
192+
193+
It becomes your problem the moment you build your own `AsyncScheduler` with a persistent
194+
data store. Do that with a serializer you trust and a job store nothing else can write to,
195+
or stay on `apscheduler3` until 4.0 is released.
196+
181197
Behaviourally the two adapters differ only where the libraries force it. APScheduler 3.x exposes
182198
no in-flight job set and its executor cancels pending futures on shutdown regardless of the `wait`
183199
flag, so that adapter tracks its own running jobs to make the grace window real.

0 commit comments

Comments
 (0)