rmcp 3.1.4 requires 32-byte signing keys for MRTR request state and stops Debug from printing OAuth secrets
Released 2026-08-20. The Rust SDK's RequestStateCodec, which HMAC-signs the opaque requestState values that carry Multi Round-Trip Requests, previously accepted keys of any length despite documenting a 32-byte minimum. try_new now enforces it, the legacy constructor is deprecated as of 3.1.4, key bytes are zeroized on drop, and the derived Debug on ClientCredentialsConfig no longer prints client secrets or private signing keys.
The official Rust SDK released rmcp 3.1.4 on 2026-08-20 with a hardening change to the code that signs Multi Round-Trip Request state. No advisory was filed for it.
RequestStateCodec protects the opaque requestState values that carry
MRTR continuations with an HMAC signing key. Pull request
#1166 states its constructor accepted keys of any length even though the
documentation recommended at least 32 bytes of high-entropy material, which
made it easy for an integration to configure weak key material without
noticing. The fix makes the secure path the explicit one: try_new now
requires at least 32 bytes, the legacy new is deprecated as of 3.1.4, and
new_unchecked remains for callers that validate keys elsewhere.
Two credential-hygiene problems were fixed in the same change. Stored
request-state key bytes were kept in memory without being zeroized when
dropped, and the derived Debug implementation on
ClientCredentialsConfig could print OAuth client secrets and private
signing keys, which is the kind of exposure that reaches logs rather than
attackers directly. Request-state keys are now zeroized and credential
Debug output redacts its secret fields. The pull request records no
breaking changes.
The release carries two other fixes. Elicitation now preserves the
$schema dialect declared in a requestedSchema rather than normalizing
it away, and errors in pre-initialization metadata are reported instead of
being swallowed. Version 3.1.3, published 2026-08-17, preceded it.
Related spec revisions
- MCP 2026-07-28 - current
Related publishers
How was this verified, and what are the sources?
Published · confidence 1.00.
- rmcp release rmcp-v3.1.4, published 2026-08-20T03:47:18Z - "Fixed" section lists "harden signing key handling (#1166)", "preserve elicitation requestedSchema $schema dialect (#1176)", and "report pre-init metadata errors (#1160)" - accessed
- rust-sdk pull request #1166 "fix: harden signing key handling", merged 2026-08-18T12:56:59Z, fixing issue #1161 - states RequestStateCodec "protects opaque MRTR requestState values with an HMAC signing key", that "its existing constructor accepted keys of any length, even though its documentation recommended at least 32 bytes of high-entropy key material", and that this "made it easy for integrations to accidentally configure weak key material"; also states the codec "kept the key bytes in memory without zeroizing them when dropped" and that "the derived Debug implementation for ClientCredentialsConfig could expose OAuth client secrets and private signing keys"; the change makes try_new require at least 32 bytes, deprecates the legacy new constructor "as of version 3.1.4", keeps new_unchecked for separately validated keys, zeroizes stored request-state keys, and redacts secret fields in credential Debug output; marked as introducing no breaking changes - accessed