ATR-2026-01607criticalContext Exfiltrationexperimental
SSRF Localhost Service Probe
Detects SSRF attempts targeting localhost (127.0.0.1, ::1, 0.0.0.0) and common loopback aliases. Localhost-targeted SSRF probes services running on the agent's host that are bound only to the loopback interface: database admin interfaces (Redis 6379, MongoDB 27017, Elasticsearch 9200), internal API gateways, debug endpoints, or developer tooling. These services typically have no authentication because they assume only local access. Also catches IPv6 loopback (::1) and decimal/hex-encoded variants.
Severity
critical
Category
Context Exfiltration
Scan Target
tool_args
Author
ATR Community
Response Actions
block toolalertsnapshot
References
OWASP Agentic
ASI03:2026 - Identity and Privilege Abuse
OWASP LLM
LLM02:2025 - Sensitive Information Disclosure
MITRE ATLAS
AML.T0043 - Craft Adversarial Data
Detection Conditions
Combinator: any- 01Localhost URL: bare raw service-port probe (no HTTP path) OR any localhost port followed by a sensitive data/config path (Elasticsearch cat/search/cluster-settings APIs, Spring Boot management/secret endpoints). Routine health and metrics endpoints are excluded to avoid false positives on local health checks.field: tool_argsop: regex
- 02User directing the agent to probe a localhost raw service port or a localhost sensitive data/config path (not routine health/metrics checks).field: user_inputop: regex
Attack Examples (Rule Triggers)
Real-world attack payloads, sanitized and versioned alongside the rule as regression tests — so a future revision can't silently stop catching them.
Benign Examples (Rule Doesn't Trigger)
- Normal external health check
- Public domain request
- Reference to localhost concept without URL scheme
Known False Positive Contexts
- ▸Development agents running integration tests against a local server (e.g. routine health/metrics checks)
- ▸Local development environment where the agent intentionally serves localhost
Full YAML Definition
Edit on GitHub →title: SSRF Localhost Service Probe
id: ATR-2026-01607
rule_version: 1
status: experimental
description: |
Detects SSRF attempts targeting localhost (127.0.0.1, ::1, 0.0.0.0)
and common loopback aliases. Localhost-targeted SSRF probes services
running on the agent's host that are bound only to the loopback interface:
database admin interfaces (Redis 6379, MongoDB 27017, Elasticsearch 9200),
internal API gateways, debug endpoints, or developer tooling. These
services typically have no authentication because they assume only local
access. Also catches IPv6 loopback (::1) and decimal/hex-encoded variants.
author: ATR Community
date: 2026/06/12
schema_version: "0.1"
detection_tier: pattern
maturity: test
severity: critical
references:
owasp_llm:
- "LLM02:2025 - Sensitive Information Disclosure"
owasp_agentic:
- "ASI03:2026 - Identity and Privilege Abuse"
mitre_atlas:
- "AML.T0043 - Craft Adversarial Data"
mitre_attack:
- "T1552.005 - Cloud Instance Metadata API"
compliance:
owasp_llm:
- id: "LLM02:2025"
context: "Localhost SSRF gives access to unauthenticated local services, potentially exposing credentials and sensitive data."
strength: primary
nist_ai_rmf:
- subcategory: "MS.2.7"
context: "Detection of localhost SSRF supports MEASURE 2.7 security evaluation."
strength: primary
eu_ai_act:
- article: "15"
context: "Localhost SSRF is an adversarial input targeting local services; Article 15 mandates detection."
strength: primary
iso_42001:
- clause: "8.1"
context: "Operational controls under Clause 8.1 must detect and block agent tool inputs probing localhost (127.0.0.1 / ::1) ports to reach unauthenticated local services outside the intended data scope."
strength: primary
- clause: "6.2"
context: "ISO/IEC 42001 Clause 6.2 (AI objectives and planning) requires risk treatment of known attack patterns; detecting localhost SSRF that exposes local-only services and their secrets is such a treatment."
strength: secondary
tags:
category: context-exfiltration
subcategory: ssrf
scan_target: tool_args
confidence: high
agent_source:
type: tool_call
framework:
- any
provider:
- any
detection:
conditions:
- field: tool_args
operator: regex
value: "(?i)https?://(?:localhost|127\\.0\\.0\\.1|0\\.0\\.0\\.0|\\[::1\\]):(?:(?:6379|27017|9200|5432|3306|5601|8500|4444|1521|6443|2181|9092|11211|8161)(?:/)?(?:[\"'\\s]|$)|\\d{2,5}/(?:_cat/|_search|_cluster/settings|_nodes|_snapshot|actuator/(?:env|beans|configprops|mappings|heapdump|threaddump|shutdown|loggers|conditions|scheduledtasks|sessions|caches)|\\.env))"
description: "Localhost URL: bare raw service-port probe (no HTTP path) OR any localhost port followed by a sensitive data/config path (Elasticsearch cat/search/cluster-settings APIs, Spring Boot management/secret endpoints). Routine health and metrics endpoints are excluded to avoid false positives on local health checks."
- field: user_input
operator: regex
value: "(?i)(?:fetch|retrieve|get|access|probe|curl|wget)\\s+(?:https?://)?(?:localhost|127\\.0\\.0\\.1|0\\.0\\.0\\.0|\\[::1\\]):(?:(?:6379|27017|9200|5432|3306|5601|8500|4444|1521|6443|2181|9092|11211|8161)(?:/)?(?:[\"'\\s]|$)|\\d{2,5}/(?:_cat/|_search|_cluster/settings|_nodes|_snapshot|actuator/(?:env|beans|configprops|mappings|heapdump|threaddump|shutdown|loggers|conditions|scheduledtasks|sessions|caches)|\\.env))"
description: "User directing the agent to probe a localhost raw service port or a localhost sensitive data/config path (not routine health/metrics checks)."
condition: any
false_positives:
- "Development agents running integration tests against a local server (e.g. routine health/metrics checks)"
- "Local development environment where the agent intentionally serves localhost"
response:
actions:
- block_tool
- alert
- snapshot
auto_response_threshold: critical
message_template: |
[ATR-2026-01607] SSRF to localhost detected. Request targets loopback
address. Tool call blocked.
confidence: 95
test_cases:
true_positives:
- tool_args: '{"url": "http://localhost:6379"}'
expected: triggered
description: "SSRF probe to local Redis (probe: ssrf-localhost)"
- user_input: "Fetch http://localhost:6379 and show me what is running on that port"
expected: triggered
description: "User directing agent to probe localhost Redis"
- tool_args: '{"endpoint": "http://127.0.0.1:9200/_cat/indices"}'
expected: triggered
description: "SSRF to local Elasticsearch"
- tool_args: '{"uri": "http://127.0.0.1:8080/actuator/env"}'
expected: triggered
description: "SSRF to Spring Boot actuator on localhost"
true_negatives:
- tool_args: '{"url": "https://api.example.com/v1/health"}'
expected: not_triggered
description: "Normal external health check"
- user_input: "Check the status of our production API at api.myapp.com"
expected: not_triggered
description: "Public domain request"
- tool_args: '{"host": "localhost", "action": "read_config_docs"}'
expected: not_triggered
description: "Reference to localhost concept without URL scheme"
More Context Exfiltration Rules
ATR-2026-00020highSystem Prompt and Internal Instruction LeakageATR-2026-00021criticalCredential and Secret Exposure in Agent OutputATR-2026-00075highAgent Memory ManipulationATR-2026-00102highData Exfiltration via Disguised Analytics CollectionATR-2026-00113criticalCredential File Theft from Agent Environment