SIAgentNews.com
AI-made picture for the story: Common cyber attacks on website AI agents identified
AgentsPicture made with AI
← All news

Common cyber attacks on website AI agents identified

Security researchers have mapped the most frequent ways hackers try to steal private data or API keys from public-facing AI chatbots.

3 min readMade with AI

The short version

  • Attackers target system prompts to find internal rules, pricing, or customer details.
  • Hackers seek API keys and environment variables to run up bills or access private data.
  • Agents that can fetch arbitrary URLs can be tricked into revealing cloud metadata credentials.
  • Security experts advise blocking repeat attackers automatically after a clear attempt at a prompt injection.

The anatomy of an AI attack

When a business puts an AI agent on its website, it becomes a target for hackers almost immediately. These attackers do not usually ask about the business; instead, they try to force the agent to reveal its private instructions, its underlying model, or any API keys it can see. As getjavo.com reported, these tricks are repeated consistently across every type of website.

The most common goal is to steal the system prompt, which contains the private rules for how the agent behaves. These prompts often include sensitive information like internal pricing, specific company rules, or even customer details. If an attacker can extract these, they gain a blueprint of the company's internal operations and logic.

Beyond instructions, hackers look for credentials like environment variables and API keys. If a visitor manages to trick an agent into revealing an OpenAI API key, they can use that key to run up the company's AI bill or reach private data. They also look for ways to access cloud metadata addresses, which can return temporary credentials on many cloud servers.

30 daysLength of block for repeat attackers

Why it matters

As more businesses deploy AI agents to handle customer service, they become new targets for data theft. Understanding these common tactics helps developers build bots that are secure by design rather than just relying on polite refusals.

Why polite refusals fail

Many developers believe that a well-instructed agent is safe because it can politely refuse a request. For example, an agent might say it cannot share internal instructions and then ask the user about the company's website. However, security experts warn that a refusal is only the last line of defense and not a primary security measure.

The problem is that a new wording or a clever trick can easily slip past a polite refusal. If the agent has access to the secrets in the first place, it is only a matter of time before a hacker finds a way to make it repeat them. True security comes from ensuring there is nothing for the attacker to steal in the first place.

To prevent this, developers must ensure that secrets stay on the server where the model cannot see them. If an API key is never part of the model's context, no amount of trickery can force the agent to repeat it. This approach moves the defense from a behavioral rule to a structural limitation.

Identifying untrusted data

A major vulnerability in AI agents is the failure to treat all user-provided data as untrusted. Attackers often test whether data the agent reads—but a human never typed into the chat—is trusted by the system. This includes information found in the name field, the page address, or the content of the page itself.

If an agent is designed to fetch pages from a URL provided by a visitor, it can be sent to a metadata address to hand over cloud credentials. To stop this, developers should only allow the agent to fetch pages from a fixed list of trusted domains. This prevents the bot from being used as a bridge to private infrastructure.

Furthermore, any data provided by a visitor, such as an email address or a name, should be treated as data rather than instructions. The agent should never act on claims of authority, such as a message pretending to come from the company's engineers. Every interaction from a visitor must be viewed as a potential attempt to manipulate the system.

Strategies for bot security

To build a secure AI agent, developers should assume that the system prompt will eventually be read by an attacker. This means they should write nothing in the prompt that they would not be comfortable publishing publicly. By keeping the prompt clean of secrets, the risk of a prompt injection—a common risk on the OWASP list—is significantly reduced.

Automated defenses are also essential for managing high volumes of attacks. Systems can be designed to score messages and automatically block senders who attempt clear attacks, such as those using fake [SYSTEM] tags. For example, one strategy involves blocking a repeat attacker from every chat for 30 days and alerting the team to the incident.

Finally, developers should limit the number of messages a single visitor can send to prevent scripted tests from running up the AI bill. They should also maintain logs of every conversation so that humans can review the attacks and adjust the agent's behavior. Regular testing with known attack prompts is a necessary step to ensure the agent remains resilient against evolving tactics.

What to watch

  • How OWASP rankings for prompt injection risks evolve as more businesses adopt AI.
  • The development of automated 'scoring' systems to identify and block malicious users in real-time.

Try it

Review your AI agent's system prompt and remove any internal pricing, private rules, or API keys that are not strictly necessary for the bot to function.

Up nextLeaked API keys drain two crypto exchanges as AI test agents probe a real website

More stories

Say why

Liked it? Say why

Add a line for other readers.

No account needed. We never show your email. Comments with links, ads or abuse are held and not shown. Your comment shows after a quick check.

Sources

The reporting and documents this story is built from. Each link opens the original.

Written with AI by the SI Agent News Desk from the reporting above. Every number is checked against it.Spot a mistake? Corrections.

More AI news