Skip to main content
Vulnerability Database/CVE-2026-88257

CVE-2026-88257: BeamMCP Schema Input Validation Vulnerability

CVE-2026-88257 is an improper input validation flaw in BeamMCP.Schema that allows MCP clients to bypass schema constraints on nested objects and arrays. This post covers the technical details, affected versions, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-88257 Overview

CVE-2026-88257 is an improper input validation vulnerability [CWE-20] in BeamMCP.Schema within the ScriptKittyOS beam_mcp library. The library implements the Model Context Protocol (MCP) for the BEAM virtual machine. The flaw allows an MCP client to invoke a tool's dispatch function with arguments that violate the input schema the server advertised. The BeamMCP.Schema.validate/2 function enforced only a limited subset of JSON Schema constraints on the top-level arguments object. Nested object and array item constraints were advertised but never checked at tools/call or prompts/get. The issue affects beam_mcp from version 0.1.0 before 0.10.1.

Critical Impact

Host dispatch code that trusts the advertised schema may receive values the schema forbids, such as out-of-range numbers or undeclared keys inside nested objects. The resulting impact depends entirely on how the host handles the unvalidated input.

Affected Products

  • ScriptKittyOS beam_mcp versions 0.1.0 through 0.10.0
  • MCP server implementations built on BeamMCP.Schema for argument validation
  • Elixir and Erlang applications exposing tools or prompts via beam_mcp

Discovery Timeline

  • 2026-10-08 - CVE CVE-2026-88257 published to NVD
  • 2026-10-08 - Last updated in NVD database

Technical Details for CVE-2026-88257

Vulnerability Analysis

The BeamMCP.Schema.validate/2 function enforces type, required, additionalProperties, enum, and numeric bounds on the top-level arguments object only. Constraints inside nested objects and on array items are silently ignored. These include items, minItems, maxItems, minLength, maxLength, pattern, nested required, nested enum, and nested additionalProperties: false. Schema keywords outside the enforced subset, such as oneOf, anyOf, and $ref, are advertised via tools/list but never evaluated. A dispatch function that relies on the declared schema receives inputs the schema forbids.

Root Cause

The root cause is incomplete JSON Schema enforcement in the validator. The server advertises a richer schema than it enforces at runtime. This mismatch between the published contract and the actual check creates a trust gap. Host code written against the advertised schema has no defensive layer for values the validator failed to reject.

Attack Vector

An authenticated MCP client submits a tools/call or prompts/get request whose arguments pass the top-level checks but violate nested or array-level constraints. For example, a nested object may contain an undeclared key, a numeric field inside an array element may fall outside its declared range, or a string may exceed its advertised maxLength. The server forwards these values to the tool's dispatch function. The downstream impact depends on how that function processes the unexpected input.

text
# Patch excerpt from lib/beam_mcp/cursor.ex (release 0.10.1)
# Routes cursor decoding through BeamMCP.JSON.decode, which applies
# the wire's nesting bound and repeated-key refusal.

    with {:ok, json} <- Base.url_decode64(cursor, padding: false),
         # The wire's one JSON reader (the nesting bound, then the repeated-key refusal), not a
         # bare Jason.decode/1: the cursor is client bytes like any other. Before 0.10.1 a
         # cursor carried a nest the body itself would have been refused for.
         {:ok, %{"v" => @version, "k" => k, "a" => key}} when is_binary(k) and is_binary(key) <-
-           Jason.decode(json) do
+           BeamMCP.JSON.decode(json) do

Source: GitHub Commit 289dbdba

Detection Methods for CVE-2026-88257

Indicators of Compromise

  • MCP tools/call or prompts/get requests containing nested objects with keys not declared in the advertised schema.
  • Request payloads with array items whose values violate minItems, maxItems, minLength, maxLength, or pattern constraints published by tools/list.
  • Dispatch-layer exceptions or -32603 Internal error responses correlated with malformed nested argument structures.

Detection Strategies

  • Compare request payloads logged at the MCP transport layer against the schemas published by tools/list and flag deviations in nested fields.
  • Enable verbose logging in dispatch functions to surface unexpected argument shapes before they reach downstream logic.
  • Audit beam_mcp dependency versions across Elixir and Erlang services to identify any instance below 0.10.1.

Monitoring Recommendations

  • Monitor stderr output from stdio-mode MCP servers for repeated exception traces tied to specific tool invocations.
  • Track rates of JSON-RPC -32603 Internal error responses on HTTP transports as a proxy for malformed input reaching dispatch.
  • Alert on anomalous argument sizes or deeply nested structures delivered to MCP endpoints.

How to Mitigate CVE-2026-88257

Immediate Actions Required

  • Upgrade beam_mcp to version 0.10.1 or later across all production and development environments.
  • Review every tool and prompt dispatch function for assumptions that the advertised schema was fully enforced.
  • Add defensive validation inside dispatch handlers for nested object keys, array item bounds, and string patterns.

Patch Information

The fix ships in beam_mcp0.10.1. The release routes JSON decoding through BeamMCP.JSON.decode, which applies nesting bounds and refuses repeated keys, and tightens validation beyond the top-level arguments object. See the GitHub Security Advisory GHSA-mrg2-4747-fmpw and the CNA advisory from the Erlang Ecosystem Foundation for complete details. Related commits are documented in commit 083838eb and commit 289dbdba.

Workarounds

  • Wrap each tool's dispatch function with a secondary validator that fully enforces the published JSON Schema, including nested and array constraints.
  • Restrict MCP server access to trusted clients via network controls or authentication while upgrades are rolled out.
  • Reject requests containing schema keywords such as oneOf, anyOf, or $ref if the host cannot evaluate them safely.
bash
# Pin beam_mcp to a patched version in mix.exs
# {:beam_mcp, "~> 0.10.1"}

mix deps.update beam_mcp
mix deps.get
mix compile

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.