Skip to content

AAK-SPLUNK-MCP-TOKEN-LEAK-001

splunk-mcp-server configured to write tokens to _internal / _audit

Field Value
Severity HIGH
Category SECRET_EXPOSURE
Shipped v0.3.6
Scanner agent_audit_kit/scanners/splunk_mcp_config.py
CWE CWE-532 + CWE-200
OWASP MCP MCP01:2025 (Token Mismanagement & Secret Exposure)
OWASP Agentic ASI03 (Identity and Privilege Abuse)
CVE CVE-2026-20205 (config variant)

What it catches

Distinct from v0.3.4's AAK-SPLUNK-TOKLOG-001 (see the per-rule index) which detects token-shaped values flowing into log sinks at runtime. This rule fires on the configuration that makes the runtime leak inevitable: a splunk-mcp-server config file (inputs.conf, splunk-mcp.yaml, or any file under a directory whose name holds both splunk and mcp, such as splunk-mcp/, splunk_mcp/ or splunk-mcp-server/) that routes a token-bearing sourcetype (splunk_session, mcp_auth, bearer, access_token, session_token, jwt) into the _internal, _audit, or _introspection index.

Detection

Two passes — every file the path gate opens gets both:

  1. YAML structured pass. yaml.safe_load, walk inputs[]/sourcetypes[], fire when an entry pairs a token-bearing sourcetype with _internal / _audit / _introspection.
  2. Line-pair regex pass. sourcetype = splunk_session AND index = _internal (or any of the two regexes) anywhere in the file. Catches inputs.conf-format files and mixed YAML.

Remediation

inputs:
  - sourcetype: mcp_session_redacted     # not splunk_session
    index: mcp_audit                      # not _internal
    path: /var/log/mcp/session.log

Route token-bearing inputs through a redaction stage before the Splunk forwarder. Bump splunk-mcp-server >= 1.0.3.


Registry reference

This section is generated from the rule registry (agent_audit_kit/rules/builtin.py) when the documentation is built, so it follows the scanner. The rest of the page is hand-written; where the two disagree, the registry is what runs.

Severity
HIGH
Category
Secret Exposure (secret-exposure)
Scanner
agent_audit_kit/scanners/splunk_mcp_config.py
Auto-fixable
No.
SARIF name
SplunkMcpTokenIndexLeak

What it detects

A splunk-mcp-server configuration (inputs.conf, splunk-mcp.yaml, or any file under splunk-mcp/, splunk-mcp-server/ or another directory named for both) routes a token-bearing source into the _internal or _audit index, or names a sourcetype known to carry session tokens (splunk_session, mcp_auth, bearer). Distinct from AAK-SPLUNK-TOKLOG-001 which fires on log-sink taint at runtime — this rule fires on the configuration that makes the runtime leak inevitable. CVE-2026-20205 origin.

How to fix

Route token-bearing inputs to a redaction stage before the Splunk forwarder. Never write to _internal from the MCP server. Bump splunk-mcp-server to >= 1.0.3.

To confirm the finding is gone, report only this rule:

agent-audit-kit scan . --rules AAK-SPLUNK-MCP-TOKEN-LEAK-001

Limitations

Reads a Splunk MCP config: inputs.conf, splunk-mcp.yaml or any file under a directory whose name holds both splunk and mcp (splunk-mcp, splunk-mcp-server). A YAML file is read as structure only when inputs or sourcetypes is a top-level list, so the same entries nested under another key, such as splunk:, are not reported. A file over 1 MB is not read.

References


All rules.