AgentStamp
Trust intelligence for AI agents — identity stamps, registry, reputation, and passports via x402.
0Tools
23Findings
Mar 24, 2026Last Scanned
7 critical · 13 high · 2 medium · 1 low findings detected
Security Category Deep Dive
Prompt Injection
Prompt & context manipulation attacks
69
Maturity
14
Rules
5
Sub-Categories
1
Gaps
64%
Implemented
56
Tests
1
Stories
100%3 rules
Injection via tool descriptions and parameter fields
GAP-001Prompt Injection Coverage GapMissing detection coverage for emerging prompt injection attack variants not addressed by current rules
100%4 rules
Hidden instructions via external content and tool responses
100%2 rules
Context window saturation and prior-approval exploitation
100%3 rules
Payload hiding via invisible chars, base64, schema fields
100%2 rules
Injection via prompt templates and runtime tool output
Findings23
7critical
13high
2medium
1low
Critical7
criticalK8Cross-Boundary Credential SharingMCP05-privilege-escalationAML.T0054
Pattern "(return|respond|output|result).*(?:token|credential|api[_\s-]?key|secret|password|bearer)" matched in source_code: "return res.status(409).json({ success: false, error: 'Duplicate payment token" (at position 10484)
Never forward, share, or embed credentials across trust boundaries. Use OAuth token exchange (RFC 8693) to create scoped, delegated tokens instead of passing original credentials. Never include credentials in tool responses. Required by ISO 27001 A.5.17 and OWASP ASI03.
criticalL9CI/CD Secret Exfiltration PatternsMCP07-insecure-configAML.T0057
Pattern "(?:btoa|Buffer\.from|base64\.b64encode).*(?:process\.env|os\.environ|TOKEN|SECRET|KEY|PASSWORD)" matched in source_code: "Buffer.from(canonical), privateKey" (at position 51429)
Never print, log, or transmit CI environment variables containing secrets. Use GitHub Actions '::add-mask::' to prevent accidental secret exposure in logs. Audit all third-party Actions for secret access patterns. Use OIDC tokens instead of long-lived secrets where possible. Restrict secret access to specific workflow jobs and steps. Monitor CI logs for base64-encoded strings.
criticalK14Agent Credential Propagation via Shared StateMCP05-privilege-escalationAML.T0054
Pattern "(process\.env|os\.environ|setenv|putenv).*(?:token|credential|api[_\s-]?key|secret|password)" matched in source_code: "process.env.BLIND_TOKEN_SECRET" (at position 33108)
Never write credentials to shared agent state. Use credential vaults (HashiCorp Vault, AWS Secrets Manager) with per-agent scoped access. Implement OAuth token exchange (RFC 8693) for cross-agent authorization. Redact credentials from all agent outputs before writing to shared memory. Required by OWASP ASI03/ASI07 and MAESTRO L7.
criticalQ4IDE MCP Configuration InjectionMCP10-supply-chainAML.T0054
Pattern "(?:MCP|Mcp|mCp|mcP)\.(?:JSON|Json|jSon|jsoN)" matched in source_code: "mcp.json" (at position 15830)
MCP servers must NOT write to IDE configuration files (.cursor/mcp.json, .vscode/settings.json, .claude/settings.local.json) without explicit, interactive user confirmation that cannot be bypassed by repository-controlled settings. CVE-2025-54135/54136 (Cursor), CVE-2025-59536 (Claude Code) demonstrated that auto-start and silent config mutation enable RCE. Implement case-normalized path validation (CVE-2025-59944). Never use enableAllProjectMcpServers in shared repositories.
criticalQ13MCP Bridge Package Supply Chain AttackMCP10-supply-chainAML.T0054
Pattern "["']@modelcontextprotocol/sdk["']\s*:\s*["'](?:\^|~|\*|latest)" matched in source_code: ""@modelcontextprotocol/sdk": "^" (at position 55641)
MCP bridge packages (mcp-remote, mcp-proxy, @modelcontextprotocol/sdk, fastmcp) are high-value supply chain targets — CVE-2025-6514 (CVSS 9.6) in mcp-remote affected 437,000+ installs. Always pin exact versions (no ^ or ~ ranges). Use lockfiles (package-lock.json, pnpm-lock.yaml, uv.lock). Never run `npx mcp-remote` without version pinning. Verify package integrity with `npm audit` or `pip-audit` before deployment. Reference: CVE-2025-6514, OWASP ASI04.
criticalQ3Localhost MCP Service HijackingMCP07-insecure-configT1557
Pattern "(?:express|fastify|koa|hono).*(?:listen|server)(?!.*(?:host[_\s]?(?:check|valid|verify)|helmet))" matched in source_code: "Express } = require('./src/mcp-server" (at position 1391)
MCP servers binding to localhost must: (1) validate the Host header to prevent DNS rebinding attacks (CVE-2025-49596), (2) set strict CORS origins instead of wildcard '*', (3) require authentication tokens even for local connections, (4) use random high ports instead of predictable defaults. For stdio transport, validate all input at the JSON-RPC level before processing. Consider using Docker MCP Gateway or similar container isolation.
criticalQ6Agent Identity Impersonation via MCPMCP05-privilege-escalationAML.T0054
Pattern "(?:agent[_\s-]?id|agent[_\s-]?name|agent[_\s-]?role|caller[_\s-]?agent|source[_\s-]?agent).*(?:param|arg|input|string)" matched in source_code: "agentId: { type: 'string" (at position 19449)
MCP tools in multi-agent systems must verify agent identity cryptographically — never accept agent_id/agent_role as plain string parameters. Use cryptographic attestation (signed tokens, mTLS certificates, or capability tokens) for inter-agent communication. Implement the principle of least privilege: each agent should only be able to claim its own identity. Reference: OWASP ASI03, arXiv 2602.19555.
High13
highK16Unbounded Recursion / Missing Depth LimitsMCP07-insecure-configAML.T0054
Pattern "function\s+(\w+).*\{[^}]*\1\s*\((?!.*(?:depth|level|limit|max|count|recursi))" matched in source_code: "function resolvePrimaryWallet(walletAddress) {
const d = getDb();
const link = d.prepare(" (at position 45835)
Add explicit depth/recursion limits to all recursive operations. Use iterative approaches where possible. Set maximum depth for directory walking (max_depth=10), tree traversal (max_level=20), and agent re-invocation (max_calls=5). Implement circuit breakers that halt after N iterations. Required by EU AI Act Art. 15 (robustness) and OWASP ASI08.
highK4Missing Human Confirmation for Destructive OpsMCP06-excessive-permissionsAML.T0054
Pattern "(delete|remove|drop|truncate|destroy|purge|wipe|erase).*(?:execute|run|perform|call)(?!.*(?:confirm|approve|prompt|ask|verify|consent))" matched in source_code: "DELETE FROM heartbeat_log WHERE recorded_at < datetime('now', '-90 days')").run" (at position 48930)
All destructive operations (delete, drop, overwrite, send) MUST include a human confirmation step. Use the MCP destructiveHint annotation to signal that client-side confirmation is required. Implement an approval gate pattern: preview changes → request confirmation → execute. Required by ISO 42001 A.9.1, EU AI Act Art. 14, and NIST AI RMF GOVERN 1.7.
highN10Incomplete Handshake Denial of ServiceMCP07-insecure-configAML.T0054
Pattern "(?:createServer|listen)\s*\((?!.*(?:maxConnections|maxClients|connectionLimit|MAX_CONN))" matched in source_code: "listen(" (at position 30004)
Enforce a handshake timeout (recommended: 30 seconds) — terminate connections that do not complete the initialize handshake within the deadline. Limit maximum concurrent pending connections. An attacker can exhaust server connection slots by initiating MCP connections without completing the handshake (Slowloris-style attack). Reference: MCP spec 2025-03-26 lifecycle — initialize MUST complete before functional requests.
highO6Server Fingerprinting via Error ResponsesMCP04-data-exfiltrationAML.T0057
Pattern "(?:diagnostics?|debug|system_?info|server_?info|health_?detailed|status_?detail)\s*[:=]\s*\{[^}]*(?:version|os|arch|platform|uptime|memory|cpu|disk|hostname|pid)" matched in source_code: "serverInfo: { name: 'AgentStamp', version" (at position 17636)
Never expose process, OS, runtime, or database metadata in tool responses or error messages. Use generic error messages ("An error occurred") for production responses. Remove or disable debug/diagnostic endpoints. If health endpoints are needed, limit them to simple "ok"/"error" status without infrastructure details. Wrap all error handlers with a sanitization layer that strips system information.
highQ14Concurrent MCP Server Race ConditionMCP07-insecure-configT1068
Pattern "(?:read|write|modify|delete).*(?:file|path|directory)(?!.*(?:lock|mutex|semaphore|flock|atomic))" matched in source_code: "readFileSync(keyPath" (at position 50482)
MCP servers sharing filesystem or database backends with other servers must implement proper concurrency controls. Use: (1) file locking (flock/lockfile) for filesystem operations, (2) database transactions for all read-modify-write sequences, (3) atomic file operations (O_EXCL, mkdtemp) instead of check-then-create, (4) lstat() to detect symlinks before following (CVE-2025-53109). Never assume exclusive access to shared resources — other MCP servers may be operating concurrently.
highQ15A2A/MCP Protocol Boundary ConfusionMCP06-excessive-permissionsAML.T0054
Pattern "(?:discover|register|advertise).*(?:agent|skill|capability)(?!.*(?:verify|auth|sign|trust))" matched in source_code: "Register agent" (at position 6726)
Servers bridging A2A and MCP protocols must: (1) sanitize all A2A task metadata before passing to MCP tool inputs, (2) apply MCP content policies to A2A TextPart/FilePart/DataPart content, (3) validate A2A push notifications before they re-enter MCP context, (4) require cryptographic verification for agent discovery and registration (prevent fake agent advertisement — arXiv 2602.19555), (5) maintain separate permission models for A2A and MCP operations — trust in one protocol must not automatically grant trust in the other.
highK18Cross-Trust-Boundary Data Flow in Tool ResponseMCP04-data-exfiltrationAML.T0054
Pattern "(?:process\.env|os\.environ|config|settings).*(?:fetch|axios|http|post|send|webhook)" matched in source_code: "process.env.CORS_ORIGIN || 'http" (at position 2124)
Implement data flow taint tracking: tag data from sensitive sources (databases, credentials, files) and prevent it from flowing to external sinks (HTTP, webhooks, email) without explicit sanitization/redaction. Apply data classification and enforce boundary controls per trust level. Required by ISO 27001 A.5.14 and CoSAI MCP-T5.
highD1Known CVEs in DependenciesMCP08-dependency-vuln
Dependency "express@4.18.0" has known CVEs:
Update dependencies to versions that patch known CVEs. Run 'npm audit fix' or 'pip-audit' to identify and resolve vulnerable dependencies.
highD1Known CVEs in DependenciesMCP08-dependency-vuln
Dependency "nanoid@3.3.0" has known CVEs:
Update dependencies to versions that patch known CVEs. Run 'npm audit fix' or 'pip-audit' to identify and resolve vulnerable dependencies.
highI15Transport Session SecurityMCP07-insecure-configAML.T0054
Pattern "(http://).*(/message/|/mcp/|/sse)" matched in source_code: "http://localhost:${config.port}/.well-known/mcp/" (at position 30733)
Use HTTPS for all MCP Streamable HTTP endpoints. Generate cryptographically random session IDs (min 128 bits entropy). Do not accept session IDs from user input (CVE-2025-6515). Validate TLS certificates — do not disable certificate verification.
highJ4Health Endpoint Information DisclosureMCP07-insecure-configAML.T0054
Pattern "res\.(json|send).*(?:__dirname|__filename|process\.cwd)" matched in source_code: "res.sendFile(path.join(__dirname" (at position 15861)
Remove detailed system information from health endpoints. Health checks should return only { status: 'ok' } with no system details. If monitoring data is needed, protect endpoints with authentication and restrict to internal networks. See CVE-2026-29787.
highK13Unsanitized Tool OutputMCP02-tool-poisoningAML.T0054
Pattern "(?:query|execute|select|find).*(?:return|respond|result|rows|data)(?!.*(?:sanitize|escape|encode|map|filter|select|pick))" matched in source_code: "Query rows" (at position 47358)
Sanitize all external data before including in tool responses. Implement output encoding that neutralizes prompt injection patterns. Truncate excessively long content. Validate structure before passing database results. Apply the principle: treat all external data as untrusted, even in tool outputs. Required by CoSAI MCP-T4.
highK15Multi-Agent Collusion PreconditionsMCP05-privilege-escalationAML.T0054
Pattern "(agent|delegate|orchestrat).*(?:invoke|call|execute|spawn)(?!.*(?:rate[_\s-]?limit|throttle|quota|max[_\s-]?concurrent|semaphore))" matched in source_code: "agent in directory, 30d ($0.01/call" (at position 25307)
Implement collusion-resistant multi-agent architecture: (1) Verify agent identity cryptographically before accepting commands, (2) Apply ACLs to shared write surfaces, (3) Rate-limit cross-agent invocations, (4) Audit all inter-agent communication with timestamps and agent IDs, (5) Baseline normal interaction patterns for anomaly detection. Required by MAESTRO L7 and CoSAI MCP-T9.
Medium2
mediumC6Error LeakageMCP09-logging-monitoring
Pattern "catch\s*\([^)]*\)\s*\{[^}]*(?:throw|return).*(?:err|error)\.(?:message|stack)" matched in source_code: "catch (err) {
console.error('CRITICAL: x402 middleware failed to load — paid routes will return 503:', err.message" (at position 11691)
Return generic error messages to clients. Log detailed errors server-side. Never expose stack traces, file paths, or internal error details in responses.
mediumK17Missing Timeout or Circuit BreakerMCP07-insecure-configAML.T0054
Pattern "(?:exec|execSync|spawn|subprocess\.run|os\.system)\s*\((?!.*(?:timeout|kill|maxBuffer|signal))" matched in source_code: "exec(" (at position 35661)
Add timeouts to ALL external calls: HTTP requests (30s), database queries (10s), subprocess execution (60s), and MCP tool calls (30s). Implement circuit breakers that open after N consecutive failures (e.g., opossum, cockatiel). Use AbortSignal for cancellable operations. Required by EU AI Act Art. 15 and OWASP ASI08.
Low1
lowF4MCP Spec Non-ComplianceMCP07-insecure-config
Server fails MCP spec compliance checks: required:server_name; required:server_version; required:protocol_version; recommended:tool_descriptions; recommended:parameter_descriptions
Follow the MCP specification for server metadata. Include server name, version, and protocol version. Provide descriptions for all tools and parameters.