One Agent, Five Zero-Days: Turning Past CVEs Into SAST Rules
Five chat-channel extensions in OpenClaw resolved human-readable allowlist entries against mutable display names, so an attacker could set their display name to an allowlisted value and be bound into the allowlist on the next gateway restart. The attacker could then message and steer the operator's tool-enabled AI agent, while the legitimate user was silently rejected.
infosecwriteups.com
Published on infosecwriteups.com
Every security engineer has seen a bug get reported, patched, written up in a postmortem, and then watched a similar bug show up six months later in a different module of the same product. Same root cause, same fix.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The startup allowlist resolution path matched configured names against mutable display names without checking the dangerouslyAllowNameMatching opt-in flag.
Impact
An attacker could drive a tool-enabled AI agent trusted by the operator, potentially reading files, sending messages, running shell commands, or hitting internal APIs, depending on how the agent is configured.
What the attacker needed
Operator uses a name-based allowlist entry; attacker can set a matching display name; gateway restarts to re-resolve names
The fix
The extensions were patched so stable IDs resolve locally without a directory lookup, and name-based resolution only runs when the operator explicitly enables the dangerous name-matching flag.
How it was found
- The operator configures an allowlist entry using a human-readable name such as "Alice".
- An attacker on the same chat platform changes their own display name or nickname to that same value.
- On the next gateway restart, the extension resolves the name against the platform directory and binds the attacker's stable ID into the allowlist.
- The attacker can now message and steer the AI agent, while the legitimate user is rejected.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
An allowlist is a list of people allowed to talk to a bot. OpenClaw let operators write names like "Alice" instead of numeric IDs, and at startup it looked up those names to find the real user. But display names can be changed by anyone, so an attacker could rename themselves "Alice" and be mistaken for the real person. The fix makes the bot use only stable IDs unless the operator explicitly opts into name matching.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.