Description
The bridge API returns access-control-allow-origin: * for arbitrary origins and exposes a public Prometheus /metrics endpoint.
Affected component(s)
bitvm-node — rpc_service/cors_config.rs (falls back to Any when CORS_ALLOWED_ORIGINS is unset/invalid) and the metrics endpoint
- Scope area: Bridge State Machine (API)
Steps to reproduce
- Send a CORS preflight with
Origin: http://evil.example.
- Send a simple
GET /v1/nodes.
GET /metrics.
Proof of concept
HTTP/1.1 200 OK
access-control-allow-methods: GET,POST,PUT,DELETE,OPTIONS
access-control-allow-headers: content-type,accept,origin,access-control-request-method,access-control-request-headers
access-control-allow-origin: *
bitvm_node_p2p_connected_peers 5
bitvm_node_p2p_required_topics_healthy ...
Security impact
Wildcard CORS lets any origin make credentialed cross-origin requests, and public metrics leak peer count, topic health, and operator/verifier request counters. Low severity, but worth tightening before mainnet.
Description
The bridge API returns
access-control-allow-origin: *for arbitrary origins and exposes a public Prometheus/metricsendpoint.Affected component(s)
bitvm-node—rpc_service/cors_config.rs(falls back toAnywhenCORS_ALLOWED_ORIGINSis unset/invalid) and the metrics endpointSteps to reproduce
Origin: http://evil.example.GET /v1/nodes.GET /metrics.Proof of concept
Security impact
Wildcard CORS lets any origin make credentialed cross-origin requests, and public metrics leak peer count, topic health, and operator/verifier request counters. Low severity, but worth tightening before mainnet.