
OpenClaw MAESTRO
A researcher applies the MAESTRO 7-layer agentic AI threat model (Foundation Models, Data Operations, Agent Frameworks, Deployment/Infra, Evaluation/Observability, Security & Compliance, Agent Ecosystem) to the OpenClaw messaging-bot agent codebase, cataloging ~30 numbered threats with specific file references (e.g. prompt injection via WhatsApp/Telegram/Discord channels in src/channels/, plaintext credential storage in pairing-store.ts, Docker socket exposure in sandbox configs, gateway loopback-binding bypass, ClawHub skill registry poisoning) alongside existing and recommended mitigations. It closes with a cross-layer chained attack scenario (gateway compromise → session store poisoning → context manipulation → sub-agent hijack → ecosystem spread) illustrating defense-in-depth across layers.
What it is
A threat model applying the MAESTRO framework (7-layer agentic AI security model) to the OpenClaw messaging agent codebase, enumerated as numbered threat IDs with severity ratings and pointers to the specific source files where each mitigation lives. The fetched text covers Layer 1 (Foundation Models: LM-001 through LM-005) and Layer 2 (Data Operations: DO-001 through DO-003, cut off mid-sentence). It is an author-run analysis inviting comment, not a vendor advisory.
How it works
Each threat pairs an attack with an in-tree mitigation. The concrete claims worth carrying past the summary:
- LM-001 prompt injection — mitigated by input sanitization in
src/agents/pi-embedded-helpers.ts(strips thought signatures, sanitizes tool calls), model failover insrc/agents/model-fallback.tson detected abuse, context-overflow guards insrc/agents/context-window-guard.ts, a/thinkdepth limit, and periodic session compaction insrc/agents/compaction.ts. - LM-002 multi-turn jailbreak — the same compaction/reset machinery limits the gradual-manipulation window.
- LM-003 API key exposure —
src/config/config.tsrejects world-readable config;src/security/audit.tsreports it. - LM-005 system-prompt leak — bootstrap in
src/agents/bootstrap-files.tsvaries prompt construction per session to defeat pattern extraction of AGENTS.md / SOUL.md / TOOLS.md. - DO-001 plaintext credentials — pairing store uses 1-hour-TTL codes, caps pending requests at 3 per channel, and uses an alphabet excluding ambiguous characters.
Preconditions / Affected
Threats center on filesystem access to ~/.openclaw/: config keys in ~/.openclaw/openclaw.json, credentials in ~/.openclaw/credentials/, and session/history data. The credential and state-directory risks (DO-001, DO-002) matter specifically on multi-user hosts where other local users can read the state directory.
What to do
Concrete, page-stated actions:
- Set the state directory to permission mode
0o700. - Run OpenClaw's own
auditcommand (src/security/audit.ts), which flags world-writable/world-readable state and credential directories with severity levels. - Store credentials via OS keychain integration rather than the default plaintext JSON.
Caveats
- Coverage is partial: only MAESTRO Layers 1–2 appear, and DO-003 is truncated in the fetched text — Layers 3–7 are not present.
- Several mitigations are stated as recommendations ("Credentials should be stored using OS keychain integration"), not confirmed defaults, so a reader must verify current behavior against the codebase rather than assume it.
- This is an individual's threat-model post soliciting corrections ("comment below if we missed anything"), not an authoritative security review.
Organisations named here
- ClawHub
Technologies named here
- MAESTRO Framework
- OpenClaw
- Node.js
- openclaw security audit --deep
- src/security/skill-scanner.ts
- openclaw doctor
- openclaw channels status --probe
- openclaw status --deep
- openclaw pairing list / approve / reject
- Docker sandbox
- Tailscale Funnel
- LanceDB
- ClawHub skill registry
- Docker
- Telegram
Techniques named here
- LM-001
- LM-002
- LM-003
- LM-004
- LM-005
- DO-001
- DO-002
- DO-003
- DO-004
- DO-005
- DO-006
- AF-001
- AF-002
- AF-003
- AF-004
- AF-005
- AF-006
- DI-001
- DI-002
- DI-003
- DI-004
- DI-005
- DI-006
- EO-001
- EO-002
- EO-003
- EO-004
- EO-005
- SC-001
- SC-002
- SC-003
- SC-004
- SC-005
- SC-006
- AE-001
- AE-002
- AE-003
- AE-004
- AE-005
- Cross-Layer Chained Threat
Related in AI Security
