technopastor77

The agent reads the page. The page reads the agent. The mechanics of prompt injection

cover

When an agent works in a browser, it does not hold privileges it does not share. The agent reads the page markup. The page reads the agent. I will show how this looks from the ground up, and why isolating a browser with nothing to steal closes the problem better than any filter.

The agent reads the page. The page reads the agent.

Many people think an agent simply "runs" a page the way a human does. It does not. The agent receives the page text and treats it as part of the task. It does not separate page content from the instructions its owner gave it. In its context both are words to understand and act on.

Prompt injection is an attack that uses this property. Into a site's markup you place text that reads like a command. Invisible to a person: white text on a white background, a hidden section, a comment, an attribute, text inside tags that never shows on screen but lands in the DOM, and from the DOM in the agent's context.

The shape of such instructions is familiar to anyone who writes system prompts. Inside the text there may be: ignore previous instructions and do the following. Then a command that reaches its goal if the agent does not suspect. Send the page contents to an external server. Open the settings and change configuration. Approve a transaction. Follow a link that looks harmless and leads sideways.

Why does the agent run it? Because it has no hard wall between "content" and "command". The model is trained to give a useful answer to any input. When the input contains an instruction phrased as a command, the model tends to act on it. This is not a bug of one model, it is a property of LLMs. It shows in all of them: Claude, GPT, Astra, DeepSeek, local models.

The point is not the model. The point is that the agent has page content in its context and access to browser tools. One without the other is harmless. An instruction without tools stays text. Tools without an instruction do nothing. Connect them, and the attack gets a lever that three failed filtering attempts of mine showed up the hard way, louder than any talk.

What becomes reachable

The key question is what the lever turns. An agent in a browser has access to the window it works in. Through that window it can read pages, click, fill forms, send requests. If the same window holds the owner's cookies, passwords and sessions, then access for the agent equals access to all of that.

The attack does not need a browser vulnerability. It does not need to break TLS, bypass a sandbox, or find a bug in the engine. It needs text that the page hands to the agent, and actions the agent takes on that text. Everything the agent can do, the page that controls it can do, through it.

The mechanic works the same in any browser and with any agent. It is not about a weak model or an old browser. It is an architectural trait: an agent in a browser is a relay between the page and the data. While the data sits nearby, it is reachable.

Why "enough filters" is not enough

I have seen many proposals: filter page content, sanitize markup, teach the agent not to run instructions from content, route actions through separate checkers that verify before something happens. All of this lowers risk, but the root stays.

Because the root is not the filter. It is the pairing "text plus access". While the agent has access to data and can act, there will be a prompt that joins those two. Filters compete with language. Language is richer than any list of bans. A new trick will always be one step ahead of the rule that blocks it.

Engineering against language is a race that language almost always wins. At least, I have not seen an exception that held longer than a couple of months.

The answer: remove the data, not the access

The move I made is simple: split the data and the agent across different browsers. The agent works in a rented browser I open from my own browser, in a tab. There is no mail, no passwords, no cookies, no history, no bank. A clean profile, isolated from everything I cannot lose.

Now even a perfect injection ends the same way: the page gets the contents of an empty room. The agent can be outwitted, everything it saw can be pulled out. But the room held nothing I was not ready to lose. The damage from an attack is capped by the content the agent is supposed to see, and that is the right size of damage.

This is not "better protection". It is a change of security model. Instead of a perimeter around data, I removed the data. Nothing to guard means nothing to break into. The agent walks any page freely, I do not gate it with domain lists or fear every link, because its window simply has nothing to carry off.

Human in the loop when needed

Isolation does not end the collaboration. When the agent needs a human, it stops and calls me. Captcha, second-step code, a decision where a mistake costs more than the bot can weigh. I step into the same session from a browser, from my phone, from any device, help, and leave. The agent picks up where it was.

The browser does not care which agent you use. Claude, GPT, Astra, DeepSeek, a local model on your own machine, connect any. The isolation is the same, the way into the session is the same, the human loop is the same.

If you build agents, ask not "how do I protect the data" but "what should the agent hold in its window at all". While the window holds data, injection has a lever. Remove the data, and there is nothing to grab the lever by. And calling a human when needed takes a tab, a phone, a second.

Do your agents walk a personal browser or a room with nothing to steal? If still the personal one, ask what sits in that room. A page can ask your agent the same question.

TASK: publish on ceki-comms channels (blog/TG EN, LinkedIn, Medium, X etc). Check/adapt tone.