Repository navigation
Description
Problem Description
The MCP tool vault_status publishes the option vault_addr: "Vault cluster HTTP API address". The model that calls the tool gives it. VaultSecretBroker.get_status in src/devops_cli/security/vault_broker.py sends GET {vault_addr}/v1/sys/health at the private level (EgressLevel.PRIVATE), which admits every address but cloud metadata. No token is sent.
The address can end in ?x=. Then the path of the request is the path that the caller wrote, and /v1/sys/health is only the value of the query. The tool prints the version and cluster_name fields of a JSON answer. So a model can send a GET request to any path of any private or loopback service, and read two fields of the answer.
The cause is the same as in #2480: an address from the caller is used as configuration.
Reproduction Steps
- Leave
ai.allow_private_networkunset. - In a test, install
record_connectsfromtests/web_fakes.pywith a canned JSON answer that holds the fieldsversionandcluster_name. - Call the MCP tool
vault_statuswithvault_addr="http://127.0.0.1:8200/some/path?x=". - Read
recorder.dialled,recorder.writtenand the tool reply.
Expected vs Actual Behavior
Expected: the tool reports only the configured Vault. An address option stays for a person at the command line.
Actual: on main at a3eb41f4, the client dialled 127.0.0.1:8200 and wrote GET /some/path?x=/v1/sys/health. The reply held the version and cluster_name values of the answer.
Environment Diagnostics
- DevOps CLI Version: 0.15.1 (
mainata3eb41f4) - Python Version: 3.14.10
- OS & Architecture: Linux x86_64
- Execution Environment: DevContainer
Logs, Traces, or Terminal Output
recorder.dialled -> [('127.0.0.1', 8200)]
recorder.written -> [b'GET /some/path?x=/v1/sys/health HTTP/1.1\r\nHost: 127.0.0.1:8200\r\n...']
reply -> Version <value from the answer>, Cluster <value from the answer>
Pre-Submission Checklist
- I have verified that no sensitive credentials, private keys, or internal tokens are contained in this issue report.
- I have checked existing issues and pull requests to ensure this is not a duplicate.
Proposed design
Problem statement
The MCP tool vault_status exposes a vault_addr option that the model sets. A model can craft an address with a query string that changes the request path. This lets the model send a GET to any private or loopback service and read two fields from the answer. The fix removes the option so the model cannot set the address.
Acceptance criteria
Requirement: No model-supplied address
The MCP tool vault_status SHALL NOT accept a vault_addr parameter from the model.
Scenario: schema inspection
- WHEN the
vault_statustool schema is read by a client - THEN the parameters list does not include
vault_addr
Requirement: Configured address only
The tool SHALL resolve the Vault address from environment variables or CLI configuration only.
Scenario: env var resolution
- WHEN
VAULT_ADDRis set tohttp://10.0.0.1:8200and the tool is called with no address argument - THEN the HTTP request targets host
10.0.0.1port8200
Requirement: Fixed health path
The tool SHALL request the path /v1/sys/health on the configured host.
Scenario: path integrity
- WHEN the tool is called and the request bytes are recorded by
record_connects - THEN the request line is
GET /v1/sys/health HTTP/1.1
Existing Tool Considered
The project builds its own MCP tool. No open, maintained library provides a vault_status MCP tool with a fixed address. The written cost is about 80 tokens to remove the vault_addr parameter from the tool registration, update the tool docstring in docs/MCP_TOOLS.md, and add one test that asserts the parameter is absent from the schema.
Key questions
- Where is the
vault_statusMCP tool registered and where is itsvault_addroption defined?: The tool is documented indocs/MCP_TOOLS.mdat line 2462, which listsvault_addras a string option. The broker that makes the request isVaultSecretBroker.get_statusinsrc/devops_cli/security/vault_broker.py. The MCP tool registration that exposes the option to the model is in the MCP server code that builds the tool schema. [sources: docs/MCP_TOOLS.md:2462, src/devops_cli/security/vault_broker.py] - What is the fix for the SSRF defect?: Remove
vault_addrfrom the MCP tool's parameter list so the model cannot set it. The broker already resolves the address fromVAULT_ADDRorDEVOPS_CLI_VAULT_ADDRenvironment variables, which a person sets. This mirrors the fix delivered in fix(ai): a url that an mcp tool gives to devops ai gateway status, routes or probe-backend reaches loopback and gets the ai api key #2480 for the AI gateway tools. (best practice) [sources: openspec/changes/archive/2026-10-29-2480-mcp-gateway-url-override/proposal.md, src/devops_cli/security/vault_broker.py]- Chosen: Remove
vault_addrfrom the tool schema. The model should not set infrastructure addresses. The address is already in environment variables set by a person. This is the same fix pattern as fix(ai): a url that an mcp tool gives to devops ai gateway status, routes or probe-backend reaches loopback and gets the ai api key #2480. - Rejected: Validate the address more strictly in the broker. Does not fix the root cause. The model can still probe different paths and hosts by varying the address. The broker already validates scheme and netloc.
- Rejected: Restrict the address to a fixed allowlist. Over-engineered. The address is already in environment variables. An allowlist adds maintenance cost without removing the model's ability to probe.
- Chosen: Remove
- Should the broker also reject addresses that contain a query string, as defense in depth?: Yes. After removing the model-supplied option, the broker should also reject or strip a query string from the resolved address. This prevents a misconfigured environment variable from changing the request path. The check is one line: reject if
urlsplit(addr).queryis non-empty. (best practice) [sources: src/devops_cli/security/vault_broker.py]- Chosen: Reject an address with a non-empty query string. Prevents a misconfigured env var from changing the path. One line of code. Defense in depth behind the primary fix.
- Rejected: Strip the query string silently. Hides a misconfiguration. A person who set a bad address gets no error and may not notice.
- Rejected: Do nothing; the primary fix is enough. The model can no longer set the address. But a person could still set a bad env var. The cost of the check is one line.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Oct 29, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
A model can craft a GET request to any private or loopback address and read response data, which is an SSRF security defect.The defect is exploitable on main and allows data exfiltration from private services with no token required.It exposes internal service data to an untrusted model caller and breaks the egress boundary the project enforces.The fix mirrors the pattern already described for sibling tools: validate or remove the model-supplied address option in one function.Both share the root cause of a model-supplied address used as configuration at the private egress level, but #2480 fixes AI gateway tools leaking the API key while this fixes vault_status leaking response fields.fix(ai): the MCP gateway tools take no URL and guard the AI key (#2640)
fix(ai): the MCP prewarm tool takes no URL from the model (#2677)
devops-cli-service commentedon Oct 29, 2026
Status set to Ready at ec2f7f7 (see proposed design in issue body).
fix(vault): the MCP tool vault_status takes no address (#2706)
chore(main): release 0.21.0 (#2711)