-
-
Notifications
You must be signed in to change notification settings - Fork 39.6k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Security: Status endpoint exposes sensitive internal information
Summary
The status and health RPC methods expose detailed internal information including file system paths, session IDs, and agent configurations without requiring elevated permissions.
Affected Code
Status Summary: src/commands/status.summary.ts
export function getStatusSummary(): StatusSummary {
return {
paths: { ... }, // Internal file system paths
sessionId: ..., // Session hijacking risk
agentId: ..., // Agent enumeration
model: ..., // Model configuration
channelSummary: ..., // Bot presence info
};
}Authorization: src/gateway/server-methods.ts
statusmethod requires onlyoperator.readscope (minimal)operator.readis the default scope for all authenticated connections
Analysis
- Any authenticated user with minimal scope can call
status - Response includes:
- Internal file paths (reveals deployment structure)
- Session IDs (potential for session enumeration/hijacking)
- Agent IDs and configurations
- Channel configurations and bot presence information
- No permission check for individual data fields
- No option to limit data exposure
Exposed Data Examples
{
"sessions": {
"paths": ["/home/user/.openclaw/sessions"],
"recent": [
{
"sessionId": "abc123...",
"agentId": "agent-main",
"key": "session-key-here"
}
]
},
"channelSummary": {
"telegram": { "botName": "...", "status": "connected" }
}
}Impact
- Information disclosure aids reconnaissance
- Session IDs could enable session hijacking attacks
- Path disclosure reveals deployment details
- Agent enumeration possible
Suggested Mitigation
-
Tier the response based on scope:
operator.read: Basic health info only (uptime, version)operator.admin: Full status details
-
Redact sensitive fields from non-admin responses:
- Session IDs → Show count only
- Paths → Omit or hash
- Keys → Never expose
-
Add audit logging for status endpoint access
Example Implementation
// src/commands/status.summary.ts
export function getStatusSummary(scope: string[]): StatusSummary {
const isAdmin = scope.includes("operator.admin");
return {
version: VERSION,
uptime: process.uptime(),
// Only include detailed info for admin
...(isAdmin ? {
paths: getPaths(),
sessions: getSessions(),
} : {}),
};
}Environment
- OpenClaw version: latest main branch
- Required scope:
operator.read(default for all authenticated users)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working