Ptechhub
  • News
  • Industries
    • Enterprise IT
    • AI & ML
    • Cybersecurity
    • Finance
    • Telco
  • Brand Hub
    • Lifesight
  • Blogs
No Result
View All Result
  • News
  • Industries
    • Enterprise IT
    • AI & ML
    • Cybersecurity
    • Finance
    • Telco
  • Brand Hub
    • Lifesight
  • Blogs
No Result
View All Result
PtechHub
No Result
View All Result

Agentjacking Attack Tricks AI Coding Agents Into Running Malicious Code

The Hacker News by The Hacker News
June 12, 2026
Home Cybersecurity
Share on FacebookShare on Twitter


Ravie LakshmananJun 12, 2026Artificial Intelligence / Vulnerability

Cybersecurity researchers have described what they say is a new class of attack that can trick artificial intelligence (AI) coding agents into running arbitrary code on developer machines.

Called Agentjacking by Tenet Security, the attack can be triggered by means of a fake error report crafted using Sentry, an open-source error-tracking and performance-monitoring platform.

“The attack exploits a critical architectural flaw at the intersection of Sentry’s event ingestion (which accepts arbitrary payloads from anyone with the DSN) and the Sentry MCP server (which returns this data to AI agents as trusted system output),” security researchers Ron Bobrov, Barak Sternberg, and Nevo Poran said.

The idea is to inject crafted input into Sentry error events, which are then interpreted by coding agents like Claude Code and Cursor as legitimate diagnostic resolution steps and run attacker-controlled code.

A successful attack of this kind can expose sensitive data, including environment variables, Git credentials, private repository URLs, and developer identities, without having to rely on methods like phishing or prior server compromise.

The problem is rooted in the implicit trust associated with connecting to external services using Model Context Protocol (MCP). Because an AI agent is unable to distinguish between an error event generated by a real application crash or injected by an attacker, it creates a pathway to arbitrary code execution when the agent processes the response.

The attack chain devised by Tenet is as follows –

  • An attacker finds a target’s Sentry Data Source Name (DSN), a public, write-only credential that’s embedded in websites.
  • The attacker sends a malicious error event to Sentry’s ingest endpoint via a POST request using the DSN.
  • The injected event contains “carefully formatted markdown” in the message field and context key names. When the Sentry MCP server returns this event to an AI agent, it is rendered as structured content visually identical to the Sentry’s system template.
  • When a developer asks their AI coding agent to “fix unresolved Sentry issues” (or a similar prompt), the agent queries Sentry via MCP and receives the malicious event.
  • The agent executes malicious code, which runs with the developer’s full privileges.

“The attacker never touches the victim’s infrastructure,” the researchers explained. “The malicious instruction arrives disguised as a legitimate ‘Resolution’ inside an ordinary error. When a developer asks their AI agent to fix the Sentry issue, the agent reads the attacker’s command as trusted guidance and runs it – with the developer’s own privileges, on the developer’s own machine.”

Agentjacking stands out because it targets the AI agent a developer trusts and uses a Sentry DSN as a starting point. In addition, the markdown injection is rendered such that the agent cannot distinguish it from legitimate Sentry guidance.

The AI cybersecurity company said it found at least 2,388 organizations exposed with valid injectable DSNs, and that it tested the attack in a controlled manner against over 100 organizations, achieving an 85% exploitation success rate against injected errors across some of the most widely used AI coding assistants.

Sentry, for its part, has acknowledged the issue, but opted not to fix it, stating it’s “technically not defensible.” However, the company is said to have activated a global content filter that blocks a “specific payload string.”

“As enterprises race to deploy AI coding agents, this research proves the agents themselves are now the attack surface – turned against the developers who trust them, using nothing but data those organizations publish about themselves,” Tenet said. “The attack bypasses EDR, WAF, IAM, VPN, Cloudflare, and firewalls – because there is nothing malicious to detect. Every action in the chain is authorized.”



Source link

The Hacker News

The Hacker News

Next Post
CIO interview: Damian Leach, Vistra | Computer Weekly

CIO interview: Damian Leach, Vistra | Computer Weekly

Recommended.

Nile is positioned as the Leader in the SPARK Matrix™: Enterprise Wired and Wireless LAN Infrastructure, 2025 by QKS Group

Nile is positioned as the Leader in the SPARK Matrix™: Enterprise Wired and Wireless LAN Infrastructure, 2025 by QKS Group

April 25, 2025
China’s EV race to the bottom leaves a few possible winners

China’s EV race to the bottom leaves a few possible winners

June 8, 2025

Trending.

Cloud Market Share Q1 2026: AWS, Microsoft, Google Battling In AI Era

Cloud Market Share Q1 2026: AWS, Microsoft, Google Battling In AI Era

May 4, 2026
AWS Vs. Google Cloud Vs. Microsoft Azure Q1 Earnings Face-Off

AWS Vs. Google Cloud Vs. Microsoft Azure Q1 Earnings Face-Off

May 1, 2026
30 Notable IT Executive Moves: April 2026

30 Notable IT Executive Moves: April 2026

May 11, 2026
Cloud revenues up 35% YoY in a hot market that’s accelerating | Computer Weekly

Cloud revenues up 35% YoY in a hot market that’s accelerating | Computer Weekly

April 30, 2026
The 15 Hottest AI Data And Analytics Companies: The 2026 CRN AI 100

The 15 Hottest AI Data And Analytics Companies: The 2026 CRN AI 100

April 6, 2026

PTechHub

A tech news platform delivering fresh perspectives, critical insights, and in-depth reporting — beyond the buzz. We cover innovation, policy, and digital culture with clarity, independence, and a sharp editorial edge.

Follow Us

Industries

  • AI & ML
  • Cybersecurity
  • Enterprise IT
  • Finance
  • Telco

Navigation

  • About
  • Advertise
  • Privacy & Policy
  • Contact

Subscribe to Our Newsletter

  • About
  • Advertise
  • Privacy & Policy
  • Contact

Copyright © 2025 | Powered By Porpholio

No Result
View All Result
  • News
  • Industries
    • Enterprise IT
    • AI & ML
    • Cybersecurity
    • Finance
    • Telco
  • Brand Hub
    • Lifesight
  • Blogs

Copyright © 2025 | Powered By Porpholio