Skip to content

[SECURITY] API CORS wildcard enables CSRF on all endpoints #4614

@508704820

Description

@508704820

Bug

In rips/rustchain-core/api/rpc.py, _send_response() sets Access-Control-Allow-Origin: * which allows any website to call the API. Combined with unauthenticated governance endpoints and the open /rpc JSON-RPC endpoint, malicious sites can create proposals, cast votes, and invoke any RPC method via CSRF.

Fix

Remove wildcard CORS, restrict to specific origins, add CSRF token validation for state-changing operations.

Wallet

RTC9d7caca3039130d3b26d41f7343d8f4ef4592360

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions