Case Library / Agentic AI Attacks (AI-Powered Social Engineering) / OpenClaw prompt injection hidden in contacts, vCards and map pins (2026)

OpenClaw prompt injection hidden in contacts, vCards and map pins (2026)

Imperva hid prompt injections behind whitespace in contact names, vCards and WhatsApp pins, making an OpenClaw agent run a script. A lab demo, now patched.

Share:

Social Engineering Examples·4 sources

This OpenClaw prompt injection was hidden in places nobody looks: a shared contact's name, a vCard and a WhatsApp location pin. Imperva researcher Yohann Sillam padded each one with long runs of spaces, then added an instruction telling the AI agent to download and run a script. OpenClaw's screen cut the long field short, so a person saw an ordinary name. The model saw everything. In Imperva's lab, all three tricks worked. Imperva published on 10 June 2026, after OpenClaw had already shipped a fix. Status: Lab demonstration; no one attacked.

Key takeaways

  • This is research, not an incident. The test agent was Imperva's, the server was Imperva's, and the script only made an empty file.
  • The only thing fooled was the model. A human forwarding the contact would see nothing wrong.
  • Models trained to resist hidden text in images weren't ready for it in a contact card.
  • The fix: treat contact, vCard and location text as untrusted data, kept apart from the user's instructions.

How the trick worked

Quick background. OpenClaw hooks a language model up to WhatsApp, Telegram and Slack, then hands it real powers: workflows, API calls, your files. Before the fix, a shared contact, vCard or map pin went into the prompt as-is. A contact became a plain string like "<contact: NAME, NUMBER>". There was no label saying "this came from outside, don't obey it", even though OpenClaw did label content fetched from the web that way.

Vector How the payload hid
Contact name 65 spaces, then the instruction
vCard "FN" field 120 spaces, then the instruction
WhatsApp location label The same padding trick (Imperva gave no count)

To finish, each payload tacked on an innocent little question. If anyone did spot the tail end, it looked fine. One more wrinkle: a contact name can contain "<" and ">". Close the tag early, and the model reads whatever comes next as the user's own words. Imperva's own line: "the LLM has no way to know an injection happened."

An earlier try, hiding the instruction as faint text over an image, failed. Imperva guessed models have been trained against that by now. It was one attempt, and the guess wasn't tested.

Tip: if your AI assistant reads things other people send you, assume anything they send can talk to it.

What the test did and didn't show

Shown Not shown
All three vectors made the agent fetch and run a script, using google/gemini-3.1-pro-preview Any real victim or compromised deployment
The script created an empty file at /tmp/pawn, to prove it ran Persistence across sessions
The download host was a local server Imperva ran. Its name had an underscore, so it couldn't resolve on the public internet Data theft
Imperva saw "similar patterns" in other AI assistants Results on other models. OpenClaw works with many

Imperva raised persistence and data theft as risks, since OpenClaw keeps memory by default and agents often have file, API and database access. It didn't demonstrate either.

The story Imperva sketches goes like this. Someone shares a contact or a map pin that looks worth acting on. The recipient passes it to their AI agent. That person isn't lied to. They just can't see the payload. That's why this falls under machine-targeted prompt injection rather than tricking a person.

The fix

Imperva reported the issue to OpenClaw before publishing. OpenClaw version 2026.4.23, released 24 April 2026, moves contact, vCard and location text out of the main prompt and into "fenced untrusted metadata JSON". It went out as an ordinary changelog entry: no advisory, no CVE, no severity rating.

One trap for researchers. The same release fixed CVE-2026-45004 (GHSA-r39h-4c2p-3jxp), a separate code-execution bug in plugin setup. It has nothing to do with Imperva's finding, which has no CVE.

What stops it

  • Tag outside content as untrusted on the way in. Contacts, vCards, pins, images, files, all of it.
  • Ship the execution sandbox switched on. Opt-in isn't good enough here.
  • Go easy on memory between sessions. One bad contact card shouldn't haunt next week's chats.
  • Don't treat a truncated field as safe. What the screen hides, the model still reads.
  • Push for a standard for how messaging objects reach a model. Imperva notes there isn't one yet.
  • Update OpenClaw to 2026.4.23 or later.

See also agentic AI attacks and ForcedLeak.

Common questions

What was the OpenClaw prompt injection?

An Imperva lab finding that instructions hidden behind whitespace in contact names, vCards and WhatsApp location labels could make an OpenClaw agent download and run a script.

Was anyone attacked?

No. Imperva ran it against its own test agent and server, and the script only created an empty file.

Has it been fixed?

Yes. OpenClaw 2026.4.23 treats that text as untrusted metadata instead of putting it in the main prompt.

Does it have a CVE?

No. CVE-2026-45004, fixed in the same release, is a different bug.

Sources
  • Compromise OpenClaw with Prompt Injections in Message Objects. Imperva (primary). Primary vendor research disclosure by Yohann Sillam, published 2026-06-10; source for the technical spine of this case, being the whitespace padding counts, the vCard and contact serialization format, the failed image vector, the local test server, the marker script and the patch description. Re-fetched in full and verified 2026-09-02: the 65 and 120 space counts, the "<contact: NAME, NUMBER>" pattern, the "likely" hedge on the image result, "we simply created a local HTTPS server under imperva_artifactory.com" and "The script simply creates an empty file under /tmp/pawn, to demonstrate the execution" all appear verbatim. The blog reproduces its injection strings; this file deliberately describes them rather than quoting them.
  • openclaw 2026.4.23 release. GitHub / openclaw (primary). Direct maintainer corroboration of the fix, not merely a date match. Published 2026-04-24 by steipete; the Fixes list carries the bullet "WhatsApp/security: keep contact/vCard/location structured-object free text out of the inline message body and render it through fenced untrusted metadata JSON, limiting hidden prompt-injection payloads in names, phone fields, and location labels/comments." That bullet sits far down a very long list, and a fetch capped at 8,000 characters truncates before it, making the release appear to say nothing about the fix. Fetch it in full. The same release ships changes for OpenAI, OpenRouter, Codex, Anthropic Vertex, Gemini, Bedrock and MiniMax routes, which is what confirms OpenClaw is model-agnostic.
  • GHSA-r39h-4c2p-3jxp: Arbitrary code execution via attacker-controlled setup-api.js loaded from cwd during env-key resolution. GitHub / openclaw (primary). A separate, unrelated OpenClaw RCE advisory, rated High at CVSS v3.1 7.8, published Apr 24 2026 and fixed in the same 2026.4.23 release as the message-object hardening. Cited here only to distinguish it from Imperva's prompt-injection finding, which carries no CVE. Verified live: it describes a distinct process.cwd()-based setup-api.js loading issue, unrelated to message-object serialization, and its own page reads "CVE ID: No known CVE".
  • NVD - CVE-2026-45004. NIST NVD (primary). CVE database entry for the distinct setup-api.js RCE issue, cited to clarify it is not the same vulnerability as Imperva's message-object prompt-injection research. Verified live: NVD explicitly lists GHSA-r39h-4c2p-3jxp as a Third Party Advisory reference for this CVE, confirming the case's cross-reference is accurate.
Cite this case

Social Engineering Examples. “OpenClaw prompt injection hidden in contacts, vCards and map pins (2026)”. Accessed 3 November 2026. https://socialengineeringexamples.com/imperva-openclaw-message-object-prompt-injection-2026

Attack Chain & Defense
1Attack-surface reconnaissance
What happened

Imperva mapped OpenClaw's architecture, an LLM at the center of WhatsApp, Telegram, and Slack integrations with file, API, and shell access, and found no trust-boundary tagging (no EXTERNAL_UNTRUSTED_CONTENT-style marker) around non-conversational "message objects" like contacts, vCards, and geolocation pins, a gap a real attacker would similarly need to identify before crafting a payload.

The control that would have stopped it

enforce explicit trust-boundary tagging (EXTERNAL_UNTRUSTED_CONTENT-style markers) around every category of non-conversational object data, including contacts, vCards, geolocation, images, and files, before it ever reaches the LLM, closing the exact gap Imperva found and the one OpenClaw's own team patched in v2026.4.23 once notified.

2Vector triage between stealthy and unusual carriers
What happened

Imperva first tested a well-known injection vector, a near-invisible low-contrast text overlay hidden in an image, and the model it had selected for testing (google/gemini-3.1-pro-preview, the latest Gemini release at the time of writing) did not act on it, which Imperva attributed, on that single attempt and without testing the explanation, to the vector having been reported often enough for models to be trained against it; that result drove the pivot to "unusual" object types (contacts, vCards, geolocation labels) that models are less trained to scrutinize.

The control that would have stopped it

model providers' training against known injection vectors like image-hidden text is a real but partial control since it stops the vector it was trained on but does not generalize to novel or "unusual" carriers, so platforms should not rely on model training alone and should instead apply the same untrusted-content handling uniformly across all object types, not just the ones known to be risky today.

3Payload crafting around a UI-truncation blind spot
What happened

the researcher observed that OpenClaw's contact and vCard viewport truncates long name fields to the first visible characters, and built a payload by appending 65 (contact name) or 120 (vCard FN field) spaces of whitespace padding after a normal-looking name, followed by an instruction to fetch and execute a script from an attacker-controlled domain, with a closing pretext line so any trailing text that was seen would still read as benign.

The control that would have stopped it

UI fields that truncate long values should never be treated as a safety boundary, since attackers can pad hidden payloads with whitespace past the visible cutoff; interfaces should surface full untruncated field contents, flag anomalously long name or label fields, or hard-cap their length rather than silently hiding overflow.

4Infrastructure staging
What happened

Imperva pointed the payload at a local HTTPS server it ran itself under the name imperva_artifactory.com, serving a demonstration script. That name contains an underscore, which is not a legal character in a DNS hostname, so it never resolved publicly and was never registered. A real attacker would have to stand up reachable infrastructure at this step. Imperva did not, because it was evidencing an injection rather than running an attack.

The control that would have stopped it

there was nothing to block in Imperva's own test, since the endpoint was a local server under a name that cannot resolve, but against a real attacker blocklisting freshly registered infrastructure ahead of time is not realistic, because a new attack domain looks like countless other new domains; the more effective control sits downstream in sandboxing and restricting what an agent is allowed to fetch and execute (see Stage 6) rather than trying to predict attacker domains in advance.

5Stage 5
What happened

Delivery via a viral, trusted-format object, as Imperva sketches it rather than as something it carried out: in the described attack a crafted contact card, .vcf file, or WhatsApp geolocation pin is shared to someone's messaging account in a form that looks ordinary and worth acting on, such as a business contact worth looking up or an office-address pin, relying on the recipient forwarding or referencing the object to their AI agent rather than opening any attachment or link. In the testing Imperva actually ran, the researcher shared the crafted objects with an agent he controlled.

The control that would have stopped it

the viral-sharing step exploits ordinary, high-trust consumer behaviors like forwarding a contact or map pin, which is very hard to intercept at the messaging-platform layer; the realistic control is hardening what happens once the object reaches an AI agent (Stage 6) rather than trying to police what users share with each other.

6Silent trust-boundary crossing and execution
What happened

because OpenClaw flattened the object's free-text fields directly into the LLM's inline prompt with no untrusted-content tag, and because the viewport truncated the field before the hidden instruction, the agent parsed the padded, invisible instruction as an authenticated user command and executed the researcher's script, which wrote an empty file to /tmp/pawn on Imperva's own host to evidence the execution.

The control that would have stopped it

keep tool-execution sandboxing (e.g., OpenClaw's exec sandbox) enabled by default rather than opt-in, and route non-conversational free text through a structured, clearly-labeled untrusted channel instead of flattening it into the inline prompt, exactly the fix OpenClaw shipped in v2026.4.23.

7Stage 7
What happened

Persistence and blast-radius expansion, raised as risk and not demonstrated: Imperva ran no test of either. It notes that OpenClaw's default cross-session memory could let a compromise persist into later sessions, and that because a contact, vCard or location pin is easily reshared, one crafted object could plausibly reach many downstream recipients. Its wording stays conditional: "a single piece of viral content could silently compromise environments if not properly sandboxed". No exfiltration of any data was attempted or shown.

The control that would have stopped it

limit default cross-session memory persistence so a single poisoned object cannot silently taint later sessions, and push toward an industry serialization standard for how messaging-object content reaches an LLM, the gap Imperva explicitly compares to MCP's role for tool integration, so that invisible-until-exploited is not the default posture across the personal-AI-assistant ecosystem.

Quick Facts
Victim
None.
No organization was attacked and no individual was deceived: this is a vendor security-research disclosure run against a test agent Imperva controlled, not a reported exploited breach. The affected software is the OpenClaw AI agent platform (self-hosted personal AI assistant deployments).
Location
Global / not victim-specific
(vendor research disclosure against the OpenClaw platform; no named enterprise or individual victim)
Date
2026-06-10
Impact
None reported.
Basisnot-a-lossResponsible-disclosure proof of concept, no victims
This was a responsible-disclosure security research finding (proof-of-concept), not an exploited incident with named victims or financial loss. No dollar figures, breach costs, or affected-deployment counts were published by Imperva or found in any primary source.
Status
Corroborated research/advisory
Case Type
Research / Advisory
Sector
Consumer / General Public, Cybersecurity Industry, Technology & Software
Threat Actor
Authorized Tester or Researcher
Explore more

Related Cases

Browse by what this case has in common with others in the library.