# GHSA-X2X3-P8J2-63MX: MCP parser differential allows read-scoped tokens to invoke write tools

- Database: GitHub
- Severity: CVSS 7.1 (High)
- Published: 2026-09-30
- Modified: 2026-09-30

## Affected versions

- github.com/0xJacky/Nginx-UI (Go): from 2.4.1, through 2.6.1

## Description

## Summary

Nginx UI used a separate JSON parse in the MCP authorization middleware to decide whether a request required `mcp:write` scope and an interactive user's secure session. Parse failures were treated as non-sensitive, while the downstream MCP server could still decode and dispatch the first valid JSON value. An authenticated caller could therefore append trailing garbage or another JSON value to a sensitive `tools/call` request and bypass the intended authorization classification.

The issue affects both read-scoped MCP service tokens and user sessions that have not completed secure-session step-up. It is not an unauthenticated vulnerability. Independent reproduction on the v2.6.x code line confirmed that a read-scoped token could reach a write-class tool when a valid JSON-RPC request was followed by another JSON value.

## Impact

An attacker who already possesses a valid read-scoped MCP service token, or a valid user session without its required secure-session binding, could invoke MCP tools classified as write operations. This could modify Nginx configuration and trigger operational actions exposed by those tools.

## Remediation

MCP requests are now parsed with a strict, shared policy before authorization. The endpoint accepts exactly one JSON object. Malformed input, trailing non-whitespace data, concatenated JSON values, and JSON-RPC batch arrays are rejected before dispatch, so parse ambiguity fails closed.

Fixed by [66471391c0b86f1fe31e9a28402aeb71d4d1bc2d](https://github.com/0xJacky/nginx-ui/commit/66471391c0b86f1fe31e9a28402aeb71d4d1bc2d).

## References

- https://github.com/0xJacky/nginx-ui/security/advisories/GHSA-x2x3-p8j2-63mx

Page: https://cve.now/GHSA-X2X3-P8J2-63MX

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
