Repository navigation
Description
Problem Description
The MCP tools valkey_ping, valkey_get, valkey_info, valkey_stats, valkey_set and valkey_flush (CONST_MCP_EXPOSURE_TABLE) publish the option url: "Valkey URL to use in place of valkey.url". The model that calls the tool gives it. _resolve_client in src/devops_cli/commands/valkey.py builds a ValkeyClient for that URL, and gives it the password from get_valkey_password(settings). The client dials at the private level (EgressLevel.PRIVATE in src/devops_cli/valkey/client.py), which admits each address but cloud metadata. valkey-py sends AUTH <password> when it connects.
Thus a model can make devops-cli send the configured Valkey password to any host that it names, and valkey_set and valkey_flush write to that host. The cause is the same as in #2480: a URL from the caller is used as configuration.
Reproduction Steps
- Set
valkey.password(orDEVOPS_CLI_VALKEY_PASSWORD) to a test value. - In a test, bind a listener on
127.0.0.1and read what it receives. - Call the MCP tool
valkey_pingwithurl="valkey://127.0.0.1:<port>/0". - Read the bytes that the listener received.
Expected vs Actual Behavior
Expected: a tool dials only the configured Valkey (valkey.url), or the password goes only to the origin of valkey.url. A URL option stays for a person at the command line.
Actual: on main at a3eb41f4, the listener received *2\r\n$4\r\nAUTH\r\n$9\r\n<password>\r\n, and then a CLIENT SETINFO command. The password was sent to the URL that the caller gave.
Other MCP tools that publish a URL option and are not checked yet: ai_prewarm (url), ai_benchmark (servers) and vault_status (vault_addr).
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
valkey_ping(url="valkey://127.0.0.1:<port>/0") -> listener received:
b'*2\r\n$4\r\nAUTH\r\n$9\r\n<password>\r\n'
b'*4\r\n$6\r\nCLIENT\r\n$7\r\nSETINFO\r\n$8\r\nLIB-NAME\r\n$9\r\nvalkey-py\r\n'
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.
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 direct the configured Valkey password to any host it names, which is a credential-exfiltration vulnerability.The configured Valkey password is sent to an arbitrary host chosen by the model, and valkey_set and valkey_flush can write to that host.Prevents exfiltration of the Valkey password to attacker-chosen hosts.The fix removes or restricts the url parameter in the six Valkey MCP tool definitions, matching the approach of #2480.Both items fix MCP tools that accept a caller-supplied URL and leak a credential to that host; the candidate targets Valkey tools and the Valkey password, while #2480 targets AI gateway tools and the AI API key.fix(ai): the MCP gateway tools take no URL and guard the AI key (#2640)
fix(valkey): the MCP Valkey tools take no URL from the model (#2655)
chore(main): release 0.16.4 (#2669)
fix(ai): the MCP prewarm tool takes no URL from the model (#2677)
fix(ai): the MCP benchmark tool takes no server URL (#2707)
docs(openspec): plan #2670 Correct Valkey MCP claim in SECURITY.md (#…