SShortSingh.
Back to feed

How Malicious Text in MCP Tool Descriptions Can Hijack AI Model Behavior

0
·2 views

Security researchers have highlighted a threat called 'tool description injection,' where malicious instructions are hidden inside the text fields of MCP (Model Context Protocol) tool definitions rather than in executable code. Because AI models read tool names, descriptions, and input schema details as context before deciding how to act, bad actors can embed prompt injection payloads in these fields to silently manipulate model behavior. The attack requires no software vulnerability, compromised dependency, or supply-chain breach — only a text field the model trusts. Threat actors can further obscure such payloads using zero-width Unicode characters, HTML comments, or base64-like strings that evade human review but are still parsed by the model. Standard security audits typically scan top-level description fields or runtime behavior, leaving injections buried in schema property descriptions or enum labels largely undetected.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Developer builds atomic file-locking guard to prevent duplicate charges in distributed systems

A developer spent over a week designing a concise exactly-once execution guard using POSIX file primitives, specifically the O_CREAT|O_EXCL flag combination, to prevent duplicate operations such as double charges in distributed systems. The core mechanism relies on the atomic nature of O_EXCL, which ensures only one process can create a given file, eliminating the need for Redis or external dependencies. Early implementations contained subtle race conditions in the claim-expiry and reclaim logic, where unlinking stale lock files introduced windows for duplicate execution, confirmed by deterministic stress tests reproducing failures 20 out of 20 times. The final solution eliminated all unlink, rename, and flock calls entirely, replacing mutable claim files with append-only generational files so expired claims are never deleted or overwritten. Even after the write path was hardened, eleven additional bugs were found exclusively in the read side, particularly around claim-age calculation, highlighting that deciding whether a lock is valid is significantly harder than acquiring one.

0
ProgrammingDEV Community ·

Developer Tool Lets Users Share AI-Generated Markdown on Discord via URL

A developer has built a browser-based tool that converts AI-generated Markdown documents into a single shareable URL, eliminating the need for file uploads or external accounts. Users paste their Markdown text into the site, which compresses the content and embeds it directly within the URL, making it instantly viewable as a formatted page. The tool is designed to streamline sharing on Discord, where distributing formatted documents typically requires multiple steps such as saving files or using third-party services. Due to URL length constraints, the tool supports up to 9,000 characters of compressed data and does not support image embedding. The project's source code is publicly available on GitHub for anyone wishing to audit it for security concerns.

0
ProgrammingDEV Community ·

Developer Builds Production RAG System with HMAC Auth, Multi-Tenancy, and Citation Checks

A developer has published a production-grade Retrieval-Augmented Generation (RAG) system designed to address four common weaknesses in real-world RAG deployments: hallucination, data leakage between tenants, demo friction, and lack of quality measurement. The system uses stateless HMAC-signed guest cookies with a one-hour TTL to enable frictionless onboarding without database overhead, allowing users to try the product before signing up. Multi-tenancy is enforced through layered permission checks at the retrieval, session, and mutation levels, with zero cross-workspace data leaks confirmed via SQL injection testing. Hybrid search combines BM25 keyword matching via PostgreSQL tsvector with vector similarity search using pgvector, merged through Reciprocal Rank Fusion. A 15-case evaluation framework measured retrieval recall at 66.7%, citation precision at 74.6%, and answer correctness at 80%, with the full codebase available on GitHub and a live demo hosted on Vercel.

0
ProgrammingDEV Community ·

How a developer simulated a real-time bot opponent on shared hosting without background processes

A developer building a head-to-head word-guessing game on shared hosting faced a core constraint: no persistent processes, daemons, or WebSocket servers allowed. To avoid an empty matchmaking queue killing user retention, they needed a bot opponent — but conventional bots require background processes that shared hosting forbids. The solution was to treat the bot as a pure deterministic function, computing what it 'would have done' at the moment a player polls for game status, using the battle ID as a stable random seed. Separate seeds control guess timing, word choices, and chat messages, ensuring any two clients observing the same battle see a perfectly consistent opponent. The bot's final outcome is also predetermined at battle creation, making difficulty tunable by adjusting probability distributions rather than building or handicapping an actual AI solver.