Skip to content

GatewayBalances account/ident parameters not type-checked before asString() #6758

Description

@mvadari

GatewayBalances account/ident parameters not type-checked before asString()

Severity: LOW
The gateway_balances handler accesses params[jss::account].asString() or params[jss::ident].asString() without first verifying the parameter is a string type. If a non-string value (integer, object, array) is passed, JsonCpp's asString() will throw a Json::LogicError. The RPC framework's exception handler (RPCHandler.cpp:177) catches this and returns rpcINTERNAL, but this is a defense-in-depth gap

Metadata

Metadata

Assignees

No one assigned

    Labels

    AI TriageBugs and fixes that have been triaged via AI initiativesBugGood First IssueGreat issue for a new contributor

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions