AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 39 Bitcoin

feat: Job scheduler (#4226)

Public commit record

What the developer wrote

Authored by Vlad Stan

55/100 · Thin
feat: Job scheduler (#4226)

Co-authored-by: alan <alan@lnbits.com>
✓ Descriptive subject✓ Uses a recognizable type or scope✓ Links an issue, advisory, or supporting reference! No meaningful explanatory body
The short version

What changed, and why it matters

This commit adds a new background job scheduler to LNbits. It lets core code, Python extensions, and sandboxed WASM extensions register recurring cron-like tasks. The change is a feature addition, not a documented security fix. The scheduler introduces new attack surface: arbitrary code execution paths for extensions, permission checks, job ownership, and cron parsing. However, the supplied diff is truncated before the API routes and most implementation details, so only a partial security review is possible from the materials given.

Recommended action

Treat this as a significant new feature with security implications rather than a confirmed vulnerability. Complete the review by examining the truncated files (scheduler_api.py, wasm_ext/api/scheduler.py, wasm_ext/wasm/scheduler.py, utils/cron.py) and their tests. Verify that HTTP endpoints enforce admin/user authorization correctly, that WASM schedule policies cannot be bypassed, that cron parsing is robust against denial-of-service or unexpected timezone behavior, and that extension callbacks run with appropriate privilege boundaries. Consider requesting a security-focused design review or audit before enabling WASM extension scheduling in production.

Security signals we found

01

New privileged execution path: scheduled callbacks can run in the background without an interactive request

02

WASM extensions can request scheduler.user and scheduler.extension permissions with admin-approved cron policies

03

Job payloads are JSON objects up to 8192 bytes; HTML-sensitive characters are escaped before storage

04

Lease-based concurrency control (60s lease, 20s renewal) with conditional completion on claim token

05

Access rechecked on execution and heartbeat; deactivated users/extensions disable further runs

06

Error messages redacted for credentials, bearer tokens, and 64-character hex values

07

History retention and per-user/per-extension count limits implemented

08

Documentation explicitly warns that leases do not guarantee exactly-once external effects

Risk score

Why this scored 39/100

Our methodology →
Potential impact 8/30
Exploitability 7/25
Stealth signal 6/15
Affected reach 9/15
Confidence 6/10
Evidence quality 3/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.