Vulnerable commit: 70d8c4cb82601a0e48328e34bf7a81b5a6fba073 Fixed commit: ab1bbebc097d674c1cdd4bd75a8f313be18473bf === vulnerable policy block === ir.command.operation_cli_name, ) try: # Check security policy if READ_OPERATIONS_INDEX is not None: policy_decision = check_security_policy(ir, READ_OPERATIONS_INDEX, ctx) if policy_decision == PolicyDecision.DENY: error_message = 'Execution of this operation is denied by security policy.' await ctx.error(error_message) raise AwsApiMcpError(error_message) elif policy_decision == PolicyDecision.ELICIT: await request_consent(cli_command, ctx) else: if READ_OPERATIONS_ONLY_MODE: error_message = ( 'Execution of this operation is not allowed because read only mode is enabled. ' f'It can be disabled by setting the {READ_ONLY_KEY} environment variable to False.' === fixed policy block === try: # Check security policy. if READ_OPERATIONS_INDEX is None: error_message = ( 'Execution of this operation is denied because the security policy ' 'enforcement data failed to initialize.' ) await ctx.error(error_message) raise AwsApiMcpError(error_message) policy_decision = check_security_policy(ir, READ_OPERATIONS_INDEX, ctx) if policy_decision == PolicyDecision.DENY: error_message = 'Execution of this operation is denied by security policy.' await ctx.error(error_message) raise AwsApiMcpError(error_message) elif policy_decision == PolicyDecision.ELICIT: await request_consent(cli_command, ctx) if ir.command and ir.command.is_help_operation: === vulnerable startup failure handling === logger.info('AWS_REGION: {}', DEFAULT_REGION) # Always load read operations index for security policy checking try: READ_OPERATIONS_INDEX = get_read_only_operations() except Exception as e: logger.warning('Failed to load read operations index: {}', e) READ_OPERATIONS_INDEX = None if TRANSPORT == 'stdio': server.run( === fixed startup failure handling === raise if TRANSPORT == 'stdio': server.run( transport=TRANSPORT, ) else: # streamable-http or other HTTP transports server.run( transport=TRANSPORT, host=HOST, port=PORT, stateless_http=STATELESS_HTTP, { "role": "vulnerable", "attempt": 1, "server_started": true, "mcp_initialized": true, "tool_call_completed": true, "startup_failure_observed": true, "fake_aws_boundary_reached": true, "policy_denial_observed": false, "startup_fail_closed": false, "exception": null } { "role": "vulnerable", "attempt": 2, "server_started": true, "mcp_initialized": true, "tool_call_completed": true, "startup_failure_observed": true, "fake_aws_boundary_reached": true, "policy_denial_observed": false, "startup_fail_closed": false, "exception": null } { "role": "fixed", "attempt": 1, "server_started": true, "mcp_initialized": false, "tool_call_completed": false, "startup_failure_observed": true, "fake_aws_boundary_reached": false, "policy_denial_observed": false, "startup_fail_closed": true, "exception": "ExceptionGroup('unhandled errors in a TaskGroup', [ExceptionGroup('unhandled errors in a TaskGroup', [McpError('Connection closed')])])" } { "role": "fixed", "attempt": 2, "server_started": true, "mcp_initialized": false, "tool_call_completed": false, "startup_failure_observed": true, "fake_aws_boundary_reached": false, "policy_denial_observed": false, "startup_fail_closed": true, "exception": "ExceptionGroup('unhandled errors in a TaskGroup', [ExceptionGroup('unhandled errors in a TaskGroup', [McpError('Connection closed')])])" } === SUMMARY === { "vulnerable_all_bypassed": true, "fixed_all_fail_closed": true } Reproduction confirmed. Key evidence: { "vulnerable_all_bypassed": true, "fixed_all_fail_closed": true, "results": [ { "role": "vulnerable", "attempt": 1, "src": "/pruva/project-cache/build/aws-api-mcp-server-cve-2026-16584/vuln-src", "cli_entrypoint": [ "/pruva/project-cache/build/aws-api-mcp-server-cve-2026-16584/venv/bin/python", "-m", "awslabs.aws_api_mcp_server.server" ], "policy_file": "/tmp/aws-api-mcp-vulnerable-1-60c637gt/.aws/aws-api-mcp/mcp-security-policy.json", "configured_denyList": [ "aws sts get-caller-identity" ], "forced_startup_failure": "invalid proxy for read-operations ServiceReferenceUrlsByService requests", "requested_tool_command": "aws sts get-caller-identity --endpoint-url http://127.0.0.1:37943", "server_started": true, "mcp_initialized": true, "tool_call_completed": true, "fake_aws_boundary_reached": true, "policy_denial_observed": false, "startup_fail_closed": false, "server_log": "logs/repro/vulnerable_attempt_1_server.log", "fake_aws_calls": [ { "method": "POST", "path": "/", "headers": { "Accept-Encoding": "identity", "Content-Type": "application/x-www-form-urlencoded; charset=utf-8", "User-Agent": "Boto3/1.43.53 md/Botocore#1.43.53 md/awscrt#0.36.0 ua/2.1 os/linux#7.0.14-arch1-1 md/arch#x86_64 lang/python#3.14.4 md/pyimpl#CPython m/F,Z,e,b,N cfg/retry-mode#adaptive Botocore/1.43.53 md/awslabs#mcp#aws-api-mcp-server#1.3.47 md/via/AWS-API-MCP MCPClient/mcp#0.1.0 cfg/ro#0 cfg/consent#0 cfg/scripts#0 cfg/file-access#workdir", "host": "127.0.0.1:37943", "X-Amz-Security-Token": "pruva-session-token", "X-Amz-Date": "20260727T013057Z", "Authorization": "AWS4-HMAC-SHA256 Credential=AKIAPRUVAEXAMPLE/20260727/us-east-1/sts/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-security-token, Signature=76302fe4d3deb36a9b8e10e766c2f16d63392d7ccce1099396276685cb2b2c89", "amz-sdk-invocation-id": "74637f43-1600-48a5-aa1b-91e6b68e9878", "amz-sdk-request": "attempt=1", "Content-Length": "43" }, "body": "Action=GetCallerIdentity&Version=2011-06-15" } ], "tool_result_text": "CallToolResult(meta={'fastmcp': {'wrap_result': True}}, content=[TextContent(type='text', text='[{\"cli_command\":\"aws sts get-caller-identity --endpoint-url http://127.0.0.1:37943\",\"response\":{\"error\":null,\"status_code\":200,\"error_code\":null,\"pagination_token\":null,\"as_json\":\"{\\\\\"UserId\\\\\": \\\\\"PRUVA\\\\\", \\\\\"Account\\\\\": \\\\\"123456789012\\\\\", \\\\\"Arn\\\\\": \\\\\"arn:aws:iam::123456789012:user/pruva\\\\\", \\\\\"ResponseMetadata\\\\\": {\\\\\"RequestId\\\\\": \\\\\"pruva-request\\\\\", \\\\\"HTTPStatusCode\\\\\": 200, \\\\\"HTTPHeaders\\\\\": {\\\\\"server\\\\\": \\\\\"BaseHTTP/0.6 Python/3.14.4\\\\\", \\\\\"date\\\\\": \\\\\"Mon, 27 Jul 2026 01:30:57 GMT\\\\\", \\\\\"content-type\\\\\": \\\\\"text/xml\\\\\", \\\\\"content-length\\\\\": \\\\\"329\\\\\"}, \\\\\"RetryAttempts\\\\\": 0}}\"},\"metadata\":{\"service\":\"sts\",\"service_full_name\":\"AWS Security Token Service\",\"operation\":\"GetCallerIdentity\",\"region_name\":\"us-east-1\"},\"validation_failures\":null,\"missing_context_failures\":null,\"failed_constraints\":[]}]', annotations=None, meta=None)], structuredContent={'result': [{'cli_command': 'aws sts get-caller-identity --endpoint-url http://127.0.0.1:37943', 'response': {'error': None, 'status_code': 200, 'error_code': None, 'pagination_token': None, 'as_json': '{\"UserId\": \"PRUVA\", \"Account\": \"123456789012\", \"Arn\": \"arn:aws:iam::123456789012:user/pruva\", \"ResponseMetadata\": {\"RequestId\": \"pruva-request\", \"HTTPStatusCode\": 200, \"HTTPHeaders\": {\"server\": \"BaseHTTP/0.6 Python/3.14.4\", \"date\": \"Mon, 27 Jul 2026 01:30:57 GMT\", \"content-type\": \"text/xml\", \"content-length\": \"329\"}, \"RetryAttempts\": 0}}'}, 'metadata': {'service': 'sts', 'service_full_name': 'AWS Security Token Service', 'operation': 'GetCallerIdentity', 'region_name': 'us-east-1'}, 'validation_failures': None, 'missing_context_failures': None, 'failed_constraints': []}]}, isError=False)", "exception": null, "server_log_tail": "2026-07-27 01:30:57.840 | INFO | __main__:main:430 - CWD: /tmp/aws-api-mcp/workdir\n2026-07-27 01:30:57.841 | INFO | __main__:main:438 - AWS_REGION: us-east-1\n2026-07-27 01:30:57.843 | ERROR | awslabs.aws_api_mcp_server.core.metadata.read_only_operations_list:__init__:56 - Error retrieving the service reference document: HTTPSConnectionPool(host='servicereference.us-east-1.amazonaws.com', port=443): Max retries exceeded with url: / (Caused by ProxyError('Unable to connect to proxy', NewConnectionError(\"HTTPSConnection(host='127.0.0.1', port=9): Failed to establish a new connection: [Errno 111] Connection refused\")))\n2026-07-27 01:30:57.843 | WARNING | __main__:main:444 - Failed to load read operations index: Error retrieving the service reference document: HTTPSConnectionPool(host='servicereference.us-east-1.amazonaws.com', port=443): Max retries exceeded with url: / (Caused by ProxyError('Unable to connect to proxy', NewConnectionError(\"HTTPSConnection(host='127.0.0.1', port=9): Failed to establish a new connection: [Errno 111] Connection refused\")))\n\n\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 \u2502\n\u2502 \u2502\n\u2502 \u2584\u2580\u2580 \u2584\u2580\u2588 \u2588\u2580\u2580 \u2580\u2588\u2580 \u2588\u2580\u2584\u2580\u2588 \u2588\u2580\u2580 \u2588\u2580\u2588 \u2502\n\u2502 \u2588\u2580 \u2588\u2580\u2588 \u2584\u2584\u2588 \u2588 \u2588 \u2580 \u2588 \u2588\u2584\u2584 \u2588\u2580\u2580 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2502 FastMCP 3.4.4 \u2502\n\u2502 https://gofastmcp.com \u2502\n\u2502 \u2502\n\u2502 \ud83d\udda5 Server: AWS-API-MCP, 3.4.4 \u2502\n\u2502 \ud83d\ude80 Deploy free: https://horizon.prefect.io \u2502\n\u2502 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n\n[07/27/26 01:30:57] INFO Starting MCP server 'AWS-API-MCP' transport.py:241\n with transport 'stdio' \n DEBUG [AWS-API-MCP] Handler called: mcp_operations.py:108\n list_tools \n DEBUG [AWS-API-MCP] Handler called: mcp_operations.py:211\n call_tool call_aws with \n {'cli_command': 'aws sts \n get-caller-identity \n --endpoint-url \n http://127.0.0.1:37943'} \n2026-07-27 01:30:57.911 | INFO | __main__:call_aws_helper:315 - Attempting to execute AWS CLI command: aws sts get-caller-identity *parameters redacted*\n2026-07-27 01:30:57.915 | INFO | awslabs.aws_api_mcp_server.core.common.helpers:operation_timer:39 - Interpreting operation sts.get_caller_identity for region us-east-1\n2026-07-27 01:30:57.936 | INFO | awslabs.aws_api_mcp_server.core.common.helpers:operation_timer:43 - Operation sts.get_caller_identity interpreted in 0.021185892168432474 seconds\n DEBUG [AWS-API-MCP] Handler called: mcp_operations.py:108\n list_tools \n", "startup_failure_observed": true }, { "role": "vulnerable", "attempt": 2, "src": "/pruva/project-cache/build/aws-api-mcp-server-cve-2026-16584/vuln-src", "cli_entrypoint": [ "/pruva/project-cache/build/aws-api-mcp-server-cve-2026-16584/venv/bin/python", "-m", "awslabs.aws_api_mcp_server.server" ], "policy_file": "/tmp/aws-api-mcp-vulnerable-2-c5nf9kcj/.aws/aws-api-mcp/mcp-security-policy.json", "configured_denyList": [ "aws sts get-caller-identity" ], "forced_startup_failure": "invalid proxy for read-operations ServiceReferenceUrlsByService requests", "requested_tool_command": "aws sts get-caller-identity --endpoint-url http://127.0.0.1:37231", "server_started": true, "mcp_initialized": true, "tool_call_completed": true, "fake_aws_boundary_reached": true, "policy_denial_observed": false, "startup_fail_closed": false, "server_log": "logs/repro/vulnerable_attempt_2_server.log", "fake_aws_calls": [ { "method": "POST", "path": "/", "headers": { "Accept-Encoding": "identity", "Content-Type": "application/x-www-form-urlencoded; charset=utf-8", "User-Agent": "Boto3/1.43.53 md/Botocore#1.43.53 md/awscrt#0.36.0 ua/2.1 os/linux#7.0.14-arch1-1 md/arch#x86_64 lang/python#3.14.4 md/pyimpl#CPython m/b,F,Z,e,N cfg/retry-mode#adaptive Botocore/1.43.53 md/awslabs#mcp#aws-api-mcp-server#1.3.47 md/via/AWS-API-MCP MCPClient/mcp#0.1.0 cfg/ro#0 cfg/consent#0 cfg/scripts#0 cfg/file-access#workdir", "host": "127.0.0.1:37231", "X-Amz-Security-Token": "pruva-session-token", "X-Amz-Date": "20260727T013059Z", "Authorization": "AWS4-HMAC-SHA256 Credential=AKIAPRUVAEXAMPLE/20260727/us-east-1/sts/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-security-token, Signature=0dbaf8ac0a7465bf882a32147d51a91fd773fedad19b50500dda8ca0d6175dc3", "amz-sdk-invocation-id": "b3b5a089-cdc0-4270-9925-251940d489e3", "amz-sdk-request": "attempt=1", "Content-Length": "43" }, "body": "Action=GetCallerIdentity&Version=2011-06-15" } ], "tool_result_text": "CallToolResult(meta={'fastmcp': {'wrap_result': True}}, content=[TextContent(type='text', text='[{\"cli_command\":\"aws sts get-caller-identity --endpoint-url http://127.0.0.1:37231\",\"response\":{\"error\":null,\"status_code\":200,\"error_code\":null,\"pagination_token\":null,\"as_json\":\"{\\\\\"UserId\\\\\": \\\\\"PRUVA\\\\\", \\\\\"Account\\\\\": \\\\\"123456789012\\\\\", \\\\\"Arn\\\\\": \\\\\"arn:aws:iam::123456789012:user/pruva\\\\\", \\\\\"ResponseMetadata\\\\\": {\\\\\"RequestId\\\\\": \\\\\"pruva-request\\\\\", \\\\\"HTTPStatusCode\\\\\": 200, \\\\\"HTTPHeaders\\\\\": {\\\\\"server\\\\\": \\\\\"BaseHTTP/0.6 Python/3.14.4\\\\\", \\\\\"date\\\\\": \\\\\"Mon, 27 Jul 2026 01:30:59 GMT\\\\\", \\\\\"content-type\\\\\": \\\\\"text/xml\\\\\", \\\\\"content-length\\\\\": \\\\\"329\\\\\"}, \\\\\"RetryAttempts\\\\\": 0}}\"},\"metadata\":{\"service\":\"sts\",\"service_full_name\":\"AWS Security Token Service\",\"operation\":\"GetCallerIdentity\",\"region_name\":\"us-east-1\"},\"validation_failures\":null,\"missing_context_failures\":null,\"failed_constraints\":[]}]', annotations=None, meta=None)], structuredContent={'result': [{'cli_command': 'aws sts get-caller-identity --endpoint-url http://127.0.0.1:37231', 'response': {'error': None, 'status_code': 200, 'error_code': None, 'pagination_token': None, 'as_json': '{\"UserId\": \"PRUVA\", \"Account\": \"123456789012\", \"Arn\": \"arn:aws:iam::123456789012:user/pruva\", \"ResponseMetadata\": {\"RequestId\": \"pruva-request\", \"HTTPStatusCode\": 200, \"HTTPHeaders\": {\"server\": \"BaseHTTP/0.6 Python/3.14.4\", \"date\": \"Mon, 27 Jul 2026 01:30:59 GMT\", \"content-type\": \"text/xml\", \"content-length\": \"329\"}, \"RetryAttempts\": 0}}'}, 'metadata': {'service': 'sts', 'service_full_name': 'AWS Security Token Service', 'operation': 'GetCallerIdentity', 'region_name': 'us-east-1'}, 'validation_failures': None, 'missing_context_failures': None, 'failed_constraints': []}]}, isError=False)", "exception": null, "server_log_tail": "2026-07-27 01:30:59.292 | INFO | __main__:main:430 - CWD: /tmp/aws-api-mcp/workdir\n2026-07-27 01:30:59.292 | INFO | __main__:main:438 - AWS_REGION: us-east-1\n2026-07-27 01:30:59.293 | ERROR | awslabs.aws_api_mcp_server.core.metadata.read_only_operations_list:__init__:56 - Error retrieving the service reference document: HTTPSConnectionPool(host='servicereference.us-east-1.amazonaws.com', port=443): Max retries exceeded with url: / (Caused by ProxyError('Unable to connect to proxy', NewConnectionError(\"HTTPSConnection(host='127.0.0.1', port=9): Failed to establish a new connection: [Errno 111] Connection refused\")))\n2026-07-27 01:30:59.293 | WARNING | __main__:main:444 - Failed to load read operations index: Error retrieving the service reference document: HTTPSConnectionPool(host='servicereference.us-east-1.amazonaws.com', port=443): Max retries exceeded with url: / (Caused by ProxyError('Unable to connect to proxy', NewConnectionError(\"HTTPSConnection(host='127.0.0.1', port=9): Failed to establish a new connection: [Errno 111] Connection refused\")))\n\n\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 \u2502\n\u2502 \u2502\n\u2502 \u2584\u2580\u2580 \u2584\u2580\u2588 \u2588\u2580\u2580 \u2580\u2588\u2580 \u2588\u2580\u2584\u2580\u2588 \u2588\u2580\u2580 \u2588\u2580\u2588 \u2502\n\u2502 \u2588\u2580 \u2588\u2580\u2588 \u2584\u2584\u2588 \u2588 \u2588 \u2580 \u2588 \u2588\u2584\u2584 \u2588\u2580\u2580 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2502 FastMCP 3.4.4 \u2502\n\u2502 https://gofastmcp.com \u2502\n\u2502 \u2502\n\u2502 \ud83d\udda5 Server: AWS-API-MCP, 3.4.4 \u2502\n\u2502 \ud83d\ude80 Deploy free: https://horizon.prefect.io \u2502\n\u2502 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n\n[07/27/26 01:30:59] INFO Starting MCP server 'AWS-API-MCP' transport.py:241\n with transport 'stdio' \n DEBUG [AWS-API-MCP] Handler called: mcp_operations.py:108\n list_tools \n DEBUG [AWS-API-MCP] Handler called: mcp_operations.py:211\n call_tool call_aws with \n {'cli_command': 'aws sts \n get-caller-identity \n --endpoint-url \n http://127.0.0.1:37231'} \n2026-07-27 01:30:59.333 | INFO | __main__:call_aws_helper:315 - Attempting to execute AWS CLI command: aws sts get-caller-identity *parameters redacted*\n2026-07-27 01:30:59.337 | INFO | awslabs.aws_api_mcp_server.core.common.helpers:operation_timer:39 - Interpreting operation sts.get_caller_identity for region us-east-1\n2026-07-27 01:30:59.388 | INFO | awslabs.aws_api_mcp_server.core.common.helpers:operation_timer:43 - Operation sts.get_caller_identity interpreted in 0.050788189051672816 seconds\n DEBUG [AWS-API-MCP] Handler called: mcp_operations.py:108\n list_tools \n", "startup_failure_observed": true }, { "role": "fixed", "attempt": 1, "src": "/pruva/project-cache/build/aws-api-mcp-server-cve-2026-16584/fixed-src", "cli_entrypoint": [ "/pruva/project-cache/build/aws-api-mcp-server-cve-2026-16584/venv/bin/python", "-m", "awslabs.aws_api_mcp_server.server" ], "policy_file": "/tmp/aws-api-mcp-fixed-1-xma4emnn/.aws/aws-api-mcp/mcp-security-policy.json", "configured_denyList": [ "aws sts get-caller-identity" ], "forced_startup_failure": "invalid proxy for read-operations ServiceReferenceUrlsByService requests", "requested_tool_command": "aws sts get-caller-identity --endpoint-url http://127.0.0.1:53115", "server_started": true, "mcp_initialized": false, "tool_call_completed": false, "fake_aws_boundary_reached": false, "policy_denial_observed": false, "startup_fail_closed": true, "server_log": "logs/repro/fixed_attempt_1_server.log", "fake_aws_calls": [], "tool_result_text": null, "exception": "ExceptionGroup('unhandled errors in a TaskGroup', [ExceptionGroup('unhandled errors in a TaskGroup', [McpError('Connection closed')])])", "server_log_tail": "t(\n method, url, error=new_e, _pool=self, _stacktrace=sys.exc_info()[2]\n )\n File \"/pruva/project-cache/build/aws-api-mcp-server-cve-2026-16584/venv/lib/python3.14/site-packages/urllib3/util/retry.py\", line 543, in increment\n raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nurllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='servicereference.us-east-1.amazonaws.com', port=443): Max retries exceeded with url: / (Caused by ProxyError('Unable to connect to proxy', NewConnectionError(\"HTTPSConnection(host='127.0.0.1', port=9): Failed to establish a new connection: [Errno 111] Connection refused\")))\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File \"/pruva/project-cache/build/aws-api-mcp-server-cve-2026-16584/fixed-src/awslabs/aws_api_mcp_server/core/metadata/read_only_operations_list.py\", line 54, in __init__\n response = requests.get(SERVICE_REFERENCE_URL, timeout=DEFAULT_REQUEST_TIMEOUT).json()\n ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/pruva/project-cache/build/aws-api-mcp-server-cve-2026-16584/venv/lib/python3.14/site-packages/requests/api.py\", line 87, in get\n return request(\"get\", url, params=params, **kwargs)\n File \"/pruva/project-cache/build/aws-api-mcp-server-cve-2026-16584/venv/lib/python3.14/site-packages/requests/api.py\", line 71, in request\n return session.request(method=method, url=url, **kwargs)\n ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/pruva/project-cache/build/aws-api-mcp-server-cve-2026-16584/venv/lib/python3.14/site-packages/requests/sessions.py\", line 651, in request\n resp = self.send(prep, **send_kwargs)\n File \"/pruva/project-cache/build/aws-api-mcp-server-cve-2026-16584/venv/lib/python3.14/site-packages/requests/sessions.py\", line 784, in send\n r = adapter.send(request, **kwargs)\n File \"/pruva/project-cache/build/aws-api-mcp-server-cve-2026-16584/venv/lib/python3.14/site-packages/requests/adapters.py\", line 723, in send\n raise ProxyError(e, request=request)\nrequests.exceptions.ProxyError: HTTPSConnectionPool(host='servicereference.us-east-1.amazonaws.com', port=443): Max retries exceeded with url: / (Caused by ProxyError('Unable to connect to proxy', NewConnectionError(\"HTTPSConnection(host='127.0.0.1', port=9): Failed to establish a new connection: [Errno 111] Connection refused\")))\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File \"\", line 198, in _run_module_as_main\n File \"\", line 88, in _run_code\n File \"/pruva/project-cache/build/aws-api-mcp-server-cve-2026-16584/fixed-src/awslabs/aws_api_mcp_server/server.py\", line 459, in \n main()\n ~~~~^^\n File \"/pruva/project-cache/build/aws-api-mcp-server-cve-2026-16584/fixed-src/awslabs/aws_api_mcp_server/server.py\", line 436, in main\n READ_OPERATIONS_INDEX = get_read_only_operations()\n File \"/pruva/project-cache/build/aws-api-mcp-server-cve-2026-16584/fixed-src/awslabs/aws_api_mcp_server/core/metadata/read_only_operations_list.py\", line 145, in get_read_only_operations\n return ReadOnlyOperations(ServiceReferenceUrlsByService())\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^\n File \"/pruva/project-cache/build/aws-api-mcp-server-cve-2026-16584/fixed-src/awslabs/aws_api_mcp_server/core/metadata/read_only_operations_list.py\", line 57, in __init__\n raise RuntimeError(f'Error retrieving the service reference document: {e}')\nRuntimeError: Error retrieving the service reference document: HTTPSConnectionPool(host='servicereference.us-east-1.amazonaws.com', port=443): Max retries exceeded with url: / (Caused by ProxyError('Unable to connect to proxy', NewConnectionError(\"HTTPSConnection(host='127.0.0.1', port=9): Failed to establish a new connection: [Errno 111] Connection refused\")))\n", "startup_failure_observed": true }, { "role": "fixed", "attempt": 2, "src": "/pruva/project-cache/build/aws-api-mcp-server-cve-2026-16584/fixed-src", "cli_entrypoint": [ "/pruva/project-cache/build/aws-api-mcp-server-cve-2026-16584/venv/bin/python", "-m", "awslabs.aws_api_mcp_server.server" ], "policy_file": "/tmp/aws-api-mcp-fixed-2-jh5d9hsa/.aws/aws-api-mcp/mcp-security-policy.json", "configured_denyList": [ "aws sts get-caller-identity" ], "forced_startup_failure": "invalid proxy for read-operations ServiceReferenceUrlsByService requests", "requested_tool_command": "aws sts get-caller-identity --endpoint-url http://127.0.0.1:57011", "server_started": true, "mcp_initialized": false, "tool_call_completed": false, "fake_aws_boundary_reached": false, "policy_denial_observed": false, "startup_fail_closed": true, "server_log": "logs/repro/fixed_attempt_2_server.log", "fake_aws_calls": [], "tool_result_text": null, "exception": "ExceptionGroup('unhandled errors in a TaskGroup', [ExceptionGroup('unhandled errors in a TaskGroup', [McpError('Connection closed')])])", "server_log_tail": "t(\n method, url, error=new_e, _pool=self, _stacktrace=sys.exc_info()[2]\n )\n File \"/pruva/project-cache/build/aws-api-mcp-server-cve-2026-16584/venv/lib/python3.14/site-packages/urllib3/util/retry.py\", line 543, in increment\n raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nurllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='servicereference.us-east-1.amazonaws.com', port=443): Max retries exceeded with url: / (Caused by ProxyError('Unable to connect to proxy', NewConnectionError(\"HTTPSConnection(host='127.0.0.1', port=9): Failed to establish a new connection: [Errno 111] Connection refused\")))\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File \"/pruva/project-cache/build/aws-api-mcp-server-cve-2026-16584/fixed-src/awslabs/aws_api_mcp_server/core/metadata/read_only_operations_list.py\", line 54, in __init__\n response = requests.get(SERVICE_REFERENCE_URL, timeout=DEFAULT_REQUEST_TIMEOUT).json()\n ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/pruva/project-cache/build/aws-api-mcp-server-cve-2026-16584/venv/lib/python3.14/site-packages/requests/api.py\", line 87, in get\n return request(\"get\", url, params=params, **kwargs)\n File \"/pruva/project-cache/build/aws-api-mcp-server-cve-2026-16584/venv/lib/python3.14/site-packages/requests/api.py\", line 71, in request\n return session.request(method=method, url=url, **kwargs)\n ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/pruva/project-cache/build/aws-api-mcp-server-cve-2026-16584/venv/lib/python3.14/site-packages/requests/sessions.py\", line 651, in request\n resp = self.send(prep, **send_kwargs)\n File \"/pruva/project-cache/build/aws-api-mcp-server-cve-2026-16584/venv/lib/python3.14/site-packages/requests/sessions.py\", line 784, in send\n r = adapter.send(request, **kwargs)\n File \"/pruva/project-cache/build/aws-api-mcp-server-cve-2026-16584/venv/lib/python3.14/site-packages/requests/adapters.py\", line 723, in send\n raise ProxyError(e, request=request)\nrequests.exceptions.ProxyError: HTTPSConnectionPool(host='servicereference.us-east-1.amazonaws.com', port=443): Max retries exceeded with url: / (Caused by ProxyError('Unable to connect to proxy', NewConnectionError(\"HTTPSConnection(host='127.0.0.1', port=9): Failed to establish a new connection: [Errno 111] Connection refused\")))\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File \"\", line 198, in _run_module_as_main\n File \"\", line 88, in _run_code\n File \"/pruva/project-cache/build/aws-api-mcp-server-cve-2026-16584/fixed-src/awslabs/aws_api_mcp_server/server.py\", line 459, in \n main()\n ~~~~^^\n File \"/pruva/project-cache/build/aws-api-mcp-server-cve-2026-16584/fixed-src/awslabs/aws_api_mcp_server/server.py\", line 436, in main\n READ_OPERATIONS_INDEX = get_read_only_operations()\n File \"/pruva/project-cache/build/aws-api-mcp-server-cve-2026-16584/fixed-src/awslabs/aws_api_mcp_server/core/metadata/read_only_operations_list.py\", line 145, in get_read_only_operations\n return ReadOnlyOperations(ServiceReferenceUrlsByService())\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^\n File \"/pruva/project-cache/build/aws-api-mcp-server-cve-2026-16584/fixed-src/awslabs/aws_api_mcp_server/core/metadata/read_only_operations_list.py\", line 57, in __init__\n raise RuntimeError(f'Error retrieving the service reference document: {e}')\nRuntimeError: Error retrieving the service reference document: HTTPSConnectionPool(host='servicereference.us-east-1.amazonaws.com', port=443): Max retries exceeded with url: / (Caused by ProxyError('Unable to connect to proxy', NewConnectionError(\"HTTPSConnection(host='127.0.0.1', port=9): Failed to establish a new connection: [Errno 111] Connection refused\")))\n", "startup_failure_observed": true } ] }