GHSA-Q382-VC8Q-7JHJ

GHSA-Q382-VC8Q-7JHJ is a high-severity security vulnerability in github.com/modelcontextprotocol/go-sdk (go), affecting versions <= 1.4.0. It is fixed in 1.4.1.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Improper handling of null Unicode character when parsing JSON in github.com/modelcontextprotocol/go-sdk

The Go SDK recently transitioned to the segmentio/encoding library for JSON parsing in version 1.3.1. While this change addressed both case-insensitivity and ASCII folding issues, the new parser implemented aggressive key matching that treated keys with null Unicode characters appended at the end as equivalent to their base strings.

Credits:

Thank you to Francesco Lacerenza (Doyensec) for reporting this issue.

Impact

When combined with duplicate keys, the described behavior leads to a "last key wins" resolution that could override the intended MCP message. This had the potential for:

  • Bypassing intermediary inspection: Proxies or policy layers that matched on exact field names may have failed to detect or filter these messages.
  • Cross-implementation inconsistency: Other MCP SDKs (TypeScript, Python) use case-sensitive parsing and would reject the same messages, creating potential security-boundary confusion.

Affected versions

github.com/modelcontextprotocol/go-sdk (<= 1.4.0)

Security releases

github.com/modelcontextprotocol/go-sdk → 1.4.1 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

The segmentio/encoding package was patched with a fix in https://github.com/segmentio/encoding/commit/7d5a25dbc5da13aed3cb047a127e4d0e96f536fb and a new version of the package was released (v0.5.4). The SDK switched to the patched version of the dependency in 724dd47aa. Users are advised to update to v1.4.1 to resolve this issue.

Frequently Asked Questions

  1. What is GHSA-Q382-VC8Q-7JHJ? GHSA-Q382-VC8Q-7JHJ is a high-severity security vulnerability in github.com/modelcontextprotocol/go-sdk (go), affecting versions <= 1.4.0. It is fixed in 1.4.1.
  2. Which versions of github.com/modelcontextprotocol/go-sdk are affected by GHSA-Q382-VC8Q-7JHJ? github.com/modelcontextprotocol/go-sdk (go) versions <= 1.4.0 is affected.
  3. Is there a fix for GHSA-Q382-VC8Q-7JHJ? Yes. GHSA-Q382-VC8Q-7JHJ is fixed in 1.4.1. Upgrade to this version or later.
  4. Is GHSA-Q382-VC8Q-7JHJ exploitable, and should I be worried? Whether GHSA-Q382-VC8Q-7JHJ is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether GHSA-Q382-VC8Q-7JHJ is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix GHSA-Q382-VC8Q-7JHJ? Upgrade github.com/modelcontextprotocol/go-sdk to 1.4.1 or later.

Other vulnerabilities in github.com/modelcontextprotocol/go-sdk

Stop the waste.
Protect your environment with Kodem.