Join our Newsletter — 33% off our NHI Course
Home› Glossary› Cyber Security› JSON-RPC 2.0
Cyber Security

JSON-RPC 2.0

← Back to Glossary
By NHI Mgmt Group Updated November 26, 2026 Domain: Cyber Security

JSON-RPC 2.0 is a stateless, transport-independent remote procedure call protocol that encodes requests and responses as JSON, using a method name, parameters and an id. The Model Context Protocol uses it. The specification defines no authentication or authorisation, so these must come from the transport or application, and servers should validate methods and parameters and limit batch sizes.

What JSON-RPC 2.0 means in practice

JSON-RPC 2.0 is a lightweight way for a client and server to exchange remote procedure calls as JSON objects. The important design point is that the protocol specifies message shape and call flow, not trust: authentication, authorisation, transport protection and method exposure are all left to the surrounding application or transport layer.

That separation is why JSON-RPC 2.0 is widely used in application interfaces, embedded services and blockchain node APIs. It gives a predictable wire format, but it does not itself decide who may call which method, whether a request is legitimate, or how to protect sensitive operations from misuse.

Core request and response model

A JSON-RPC request normally includes a method name, optional params, and an id that lets the sender correlate responses. The protocol also supports notifications, which are one-way calls that do not expect a response, and batching, which allows multiple calls to be sent together.

Those features are useful for efficiency, but they also shape the attack surface. Batch handling can amplify request volume, notifications can bypass response-based error handling, and poorly validated parameters can expose unexpected server-side actions. The protocol itself does not define method-level permissions, so the server must decide which methods exist and which inputs are acceptable.

Why transport independence matters

Because JSON-RPC 2.0 is transport-independent, it can run over HTTP, WebSocket, message queues or other links. That flexibility is useful, but it means the protocol cannot assume any particular security property from the wire format alone.

In practice, the transport often becomes the control boundary. A deployment may rely on TLS, reverse-proxy authentication, mutual TLS, gateway policy or application-layer checks to compensate for the protocol's lack of built-in identity or access control. When those outer controls are weak, the RPC endpoint can become easier to enumerate, abuse or expose than the service owner intended.

Methods, parameters and operational guardrails

The security posture of a JSON-RPC 2.0 service depends heavily on how strictly it handles method names, parameter schemas and batch size. A permissive implementation may accidentally expose administrative methods, accept unexpected parameter combinations, or allow unbounded batches that create availability problems.

For that reason, JSON-RPC 2.0 should be treated as an interface contract that needs policy around it. The protocol defines how to format a call, but the application must define which methods are valid, which callers are allowed to invoke them, and how errors are returned without leaking sensitive detail.

Where JSON-RPC 2.0 is commonly used

JSON-RPC 2.0 often appears in service back ends, developer tooling and node APIs where a simple machine-readable command interface is preferred. The Model Context Protocol uses it, which is one reason the protocol matters in modern application and AI-adjacent stacks.

In blockchain and distributed ledger environments, JSON-RPC endpoints are especially sensitive because they can surface node operations, account-related actions or transaction submission paths. The broad operational lesson is the same across deployments: the protocol is only the envelope. The security outcome depends on method exposure, caller trust, and the controls wrapped around the endpoint.

Risk and Threat Considerations

JSON-RPC 2.0 creates risk when teams assume the protocol itself provides security. Exposed RPC endpoints can become a direct path to sensitive methods, while batch abuse, method enumeration and weak parameter validation can increase the impact of a single exposed interface.

Failure mechanism: Attackers or unauthorised users exploit the absence of built-in authentication and authorisation, then probe method names, supply crafted parameters, or use large batches to reach privileged or resource-intensive operations.

Impact: The result can be unauthorised actions, data exposure, denial of service, or unintended invocation of sensitive backend functions, especially when the endpoint is reachable from untrusted networks.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP API Security Top 10 addresses the attack and risk surface, while NIST SP 800-53 Rev 5 sets the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP API Security Top 10API5 — Broken Function Level AuthorizationJSON-RPC method exposure depends on function-level access control.
Recommendation — Enforce function-level checks for every RPC method before execution.
NIST SP 800-53 Rev 5AC-3 — Access EnforcementRPC methods need enforceable access decisions at the application boundary.
IA-5 — Authenticator ManagementJSON-RPC deployments often rely on transport or application authenticators.
SI-10 — Information Input ValidationJSON-RPC parameters must be validated before backend execution.
Recommendation — Apply AC-3 to restrict each RPC method to authorised callers. Manage authenticators used to protect RPC access and rotate them securely. Validate JSON-RPC parameters and reject malformed or unexpected inputs.

Practitioner Guidance

Why practitioners should care: Treat JSON-RPC 2.0 as a transport format, not a security control. The application layer must explicitly define method allow lists, caller authentication, per-method authorisation and request-size limits because the protocol itself does not do that work.

What to watch for: Exposed node RPC ports, overbroad method surfaces, permissive batch handling and notifications that bypass normal response-based monitoring are all signals that the endpoint needs stronger controls and review.

Practitioner takeaway: If a JSON-RPC endpoint can reach privileged functionality, validate the method surface as carefully as you would any other administrative API.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on November 26, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org