JSON-RPC is a remote procedure call protocol that uses JSON to carry requests and responses between client and server. In practice, it sends method names, parameters, and identifiers through a single endpoint, which makes security controls depend on body inspection, method authorization, and strict validation rather than URL structure.
What JSON-RPC Is Used For
JSON-RPC is designed for structured remote procedure calls over a single endpoint, which means the application must distinguish safe methods from unsafe ones inside the message body rather than by path or verb alone. That makes it a protocol discipline as much as a transport choice, because the receiver has to know exactly which methods are exposed and who may invoke them.
In practice, JSON-RPC is common where clients need a compact request-response interface and the server exposes a defined set of callable actions. The simplicity is useful, but it also concentrates security decisions into one interface, so method design and request handling become part of the attack surface.
Why JSON-RPC Needs Tight Message Validation
Because JSON-RPC carries method names, parameters, and identifiers inside JSON, the server cannot rely on URL segmentation to separate benign from dangerous requests. Every incoming message needs strict schema validation, type checking, and rejection of unexpected fields or malformed identifiers so that the parser does not become a hidden trust boundary.
That matters most when a protocol endpoint accepts mixed operations through the same channel. A weak implementation may let attackers probe internal methods, supply unexpected parameter shapes, or trigger ambiguous behaviour in downstream application logic.
Security Controls Around Method Authorization
The main control question in JSON-RPC is not just whether the request is syntactically valid, but whether the caller is entitled to invoke that specific method. Method-level authorization should be explicit, because a single endpoint can expose functions with very different risk profiles, from read-only queries to destructive or state-changing actions.
That is why JSON-RPC implementations often need stronger application-layer enforcement than a typical route-based API. If authorization is inferred too late, or only after the method is dispatched, the protocol can allow unauthorized access to functionality that was never meant to be broadly callable.
Blockchain and Distributed Ledger Security Guide is a useful companion here because it covers node RPC hardening, validator key protection, and the trust assumptions around exposed RPC interfaces.
Operational Risks When JSON-RPC Is Exposed
JSON-RPC is especially sensitive when an endpoint is reachable from untrusted networks or embedded in a broader service mesh without strong filtering. Exposed administrative or debug methods can become a direct path to configuration changes, sensitive data access, or abuse of privileged functionality if the interface is not tightly reduced to the minimum necessary methods.
Another practical risk is that security reviews focus on the transport layer while overlooking the method catalogue. In JSON-RPC, the endpoint can look uniform while the underlying actions vary widely, so inventorying the callable surface is part of exposure management, not just documentation.
Risk and Threat Considerations
JSON-RPC concentrates many actions behind one endpoint, so a flaw in method exposure, validation, or authorization can create broad compromise potential. Attackers often look for privileged methods, unsafe parameter handling, or hidden administrative functions because one successful request may reach more than one sensitive backend capability.
Failure mechanism: Inadequate method-level authorization, permissive parsing, or poor request validation can let an attacker call unintended functions, escalate impact through a single interface, or abuse debug and admin methods that should not be reachable externally.
Impact: The result can be unauthorized state changes, data exposure, service disruption, or lateral abuse of downstream systems that trust the JSON-RPC caller.
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 and CIS Controls v8 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP API Security Top 10 | API5 — Broken Function Level Authorization | JSON-RPC depends on per-method authorization inside one endpoint. |
| Recommendation — Enforce per-method authorization checks before dispatching JSON-RPC actions. | ||
| NIST SP 800-53 Rev 5 | AC-6 — Least Privilege | JSON-RPC methods should be callable only by identities needing each action. |
| SI-10 — Information Input Validation | JSON-RPC safety depends on strict validation of body fields, types, and parameters. | |
| AU-12 — Audit Record Generation | Single-endpoint RPC needs method-level logging for traceability and abuse review. | |
| Recommendation — Restrict JSON-RPC callers to the minimum methods and privileges required. Validate every JSON-RPC request field, type, and parameter before processing. Log JSON-RPC method names, parameters, and outcomes for review and detection. | ||
| CIS Controls v8 | CIS-16 — Application Software Security | JSON-RPC is an application-layer interface that needs secure design and review. |
| Recommendation — Review JSON-RPC handlers for authorization, validation, and unsafe exposed methods. | ||
Practitioner Guidance
Why practitioners should care: JSON-RPC deserves the same scrutiny as any externally reachable API, but the security decision point is inside the message body. Teams should treat the exposed method list as a controlled attack surface and review it whenever the protocol surface changes.
What to watch for: Pay special attention to unauthenticated endpoints, methods that perform privileged actions, and handlers that rely on generic input parsing without explicit allowlisting. Those are the places where JSON-RPC usually breaks down operationally.
Practitioner takeaway: If the protocol is shared by many callers, design for method allowlisting, strict schema enforcement, and clear separation between low-risk and high-risk operations.
Related resources from NHI Mgmt Group
- How should security teams implement method-level authorization in JSON-RPC APIs?
- Why do JSON-RPC APIs complicate traditional WAF and rate-limiting controls?
- What breaks when JSON-RPC input is not schema validated and parameterized?
- How do organisations reduce method enumeration and information leakage in JSON-RPC error handling?
Deepen Your Knowledge
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.
Reviewed and updated by the NHIMG editorial team on October 31, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org