Repository navigation
Releases
MockServer 9.4.0
[9.4.0] - 2026-11-20
Security
- Every Docker image now runs a Java runtime with the fix for CVE-2026-114938, a memory-corruption bug in how JDK 17.0.6 and later, 21, 25, 26 and 27 decode Base64 on x86-64 processors with AVX-512. MockServer decodes Base64 sent by clients, such as an expectation's
base64Bytesand gRPC-Web text bodies, before checking any credentials. On x86-64 the standard,-aot,-graaljs,-http3, snapshot and root images and themockserver-webhookimage run Eclipse Temurin 27.0.1.1, and the-clusteredimage runs Temurin 21.0.13.1; the ARM64 images, which the bug does not affect, run the newest Temurin ARM64 build (27.0.1.0.2, and 21.0.13 for-clustered). The images therefore do not set the-XX:-UseBASE64Intrinsicsworkaround. The binary bundle, which still carries its own Temurin 21 runtime, starts Java with-XX:-UseBASE64IntrinsicsafterMOCKSERVER_JAVA_OPTSinbin/mockserverandbin/mockserver.bat, andmockserver-nodeand the VS Code extension, which start the bundled Java themselves, put it in the same place. The Maven plugin'srunForkedgoal andmockserver-noderunning the jar on your own Java pass it too, before your JVM options. The option switches off the optimised Base64 encoder and decoder, and results are unchanged. Security researchers recommend it and the JDK vendors have not yet confirmed it, and remote code execution has not been demonstrated. If you run MockServer on your own Java (the executable JAR, the WAR, the Maven plugin, JUnit, Spring or the Java API), update to a fixed JDK (Oracle or Eclipse Temurin 17.0.21.1, 21.0.13.1, 25.0.5.1 or 27.0.1.1, Amazon Corretto 17.0.21.1.2, or a fixed Azul build) or add the option yourself; see the security notice customJsonUnitMatchersClasscan only be set at startup (BREAKING for anyone who changescustomJsonUnitMatchersClasswithPUT /mockserver/configurationor a client'supdateConfiguration; see upgrading to 9). This setting names the class MockServer loads and creates to supply custom json-unit matchers, but aPUT /mockserver/configurationcould change it on a running server, and MockServer created the named class before checking that it implementsCustomJsonUnitMatcherProvider. So anyone who could reach the control plane could make MockServer run the static initialiser and no-argument constructor of almost any class on its classpath. APUTthat sets a different value is now still answered, but the value is ignored, a warning is logged andGET /mockserver/configurationreports the value in force; aPUTthat sends the value already in force logs nothing. Set it before the server starts with a system property, environment variable,mockserver.propertiesorConfiguration. MockServer also now ignores, with the same warning as before, a named class that does not implementCustomJsonUnitMatcherProviderwithout running any of its code.- Agent skills:
dockerhub-credentialsno longer asks for the Docker Hub token in the chat or puts it on a command line; you now enter it at a hidden prompt in your own terminal, and it reaches AWS Secrets Manager through a private temporary file (#3027).pr-monitornow only reports when asked to monitor or watch PRs, and merges only when asked to merge (its script needs--merge), holds merges while a release is in progress, and no longer hides its status report (#3028)
Added
Changed
- Every Docker image except
-clusterednow runs Java 27: Eclipse Temurin from a checksum-pinned Adoptium download, trimmed with jlink and copied ontogcr.io/distroless/java-base-debian13. The standard and-aotimages move from Java 26 and 25. The root, snapshot,-graaljsandmockserver-webhookimages used the distroless Java 25 image and keep its Java modules except four that the Temurin 27 JDK no longer ships:jdk.graal.compiler,jdk.graal.compiler.management,jdk.internal.vm.ciandjdk.jsobject. The-clusteredimage moves from the distroless Java 21 image to a jlink-trimmed Temurin 21, because its Infinispan library cannot start on Java 24 or later, and dropsjdk.internal.vm.ci,jdk.internal.vm.compiler,jdk.internal.vm.compiler.managementandjdk.jsobject. Every image uses the base image's Debian trust store (/etc/ssl/certs/java/cacerts), as the distroless Java images did, so a trust store mounted there is used. The library is still compiled for Java 17. Start-up figures for the new runtime have not been re-measured yet. -XX:+ZGenerationalnow stops the Java 27 images from starting (BREAKING for anyone who still passes it inJAVA_TOOL_OPTIONSor the Helm chart'sapp.jvmOptionsto any image except-clustered): Java 27 no longer recognises it and exits withUnrecognized VM option 'ZGenerational', where Java 25 and 26 ignored it with a warning. Drop it;-XX:+UseZGCalone already gives generational ZGC. The-clusteredimage, still on Java 21, keeps-XX:+UseZGC -XX:+ZGenerational.- Every image's Java is now at
/usr/lib/jvm/temurin-trimmed/bin/java, and on thePATH. The root, snapshot,-graaljs,-clusteredandmockserver-webhookimages keep/usr/bin/javaas a link to it, but their arch-specific Java home (such as/usr/lib/jvm/temurin-25-jre-amd64) and theJAVA_VERSIONenvironment variable are gone: usejavaon thePATHor the new path. The standard and-aotimages used/usr/lib/jvm/temurin25-trimmed/bin/java, which still works as a link to the new path, so an entrypoint override copied from an older image keeps starting; switch it to the new path. - The
-sources.jarof each-no-dependenciesartifact on Maven Central (mockserver-netty-no-dependencies,mockserver-client-java-no-dependencies,mockserver-junit-jupiter-no-dependencies,mockserver-junit-rule-no-dependenciesandmockserver-spring-test-listener-no-dependencies) now holds only MockServer's own sources, so it is a few MB instead of 34 to 51 MB. It used to also hold the sources of every library those jars bundle. To read a bundled library's sources, use that library's own-sources.jar. The library is renamed undershaded_packagein the jar, but its sources keep the original package names. mockserver-junit-jupiter-no-dependencies,mockserver-junit-rule-no-dependenciesandmockserver-spring-test-listener-no-dependencieskeep their names but no longer each carry a full copy of the MockServer server (about 87 MB each). Each jar now holds only its own classes and brings inmockserver-netty-no-dependenciesas a dependency, which Maven and Gradle download for you, so build files need no change; if you also listedmockserver-netty-no-dependencies, you no longer get two copies of every MockServer class. Three things now matchmockserver-netty-no-dependencies: HTTPS uses Java's built-in TLS instead of bundled OpenSSL libraries; amodule-info.javathat usesClientAndServerorMockServerClientalso needsrequires org.mockserver.netty;; and a project with no SLF4J provider now gets MockServer's log output through java.util.logging. See Upgrading to 9.0.0.- The CycloneDX software bill of materials on Maven Central is now one file covering every released module and its dependencies, at
org/mock-server/mockserver/<version>/mockserver-<version>-cyclonedx.json(for examplehttps://repo1.maven.org/maven2/org/mock-server/mockserver/<version>/mockserver-<version>-cyclonedx.json). This applies from the release after 9.3.0. 9.3.0 published a separate<artifactId>-<version>-cyclonedx.jsonnext to each module, and itsmockserver-9.3.0-cyclonedx.jsoncovers only the parent POM. From the next release, fetch the single file instead. The single file covers the Maven plugin too.
Fixed
maxLoggedMatchFailuresnow also limits requests served by a forward expectation. After the upstream answered, mock drift detection (on by default) checked the request against every expectation again and logged a "didn't match expectation" line for each one, with no limit and no "further did-not-match entries were not logged" summary, so one forwarded request could log a line per configured expectation, including a second "matched expectation" line. That check no longer logs match results; the request's own matching still logs them, within the limit. gRPC bidirectional-streaming requests, whose routing check logged every expectation it tried before the request's own matching logged them again, no longer log them twice either.PUT /mockserver/pact/verifyno longer writes a per-expectation match entry for each interaction either; its result reports the outcome (#3020)maxLoggedMatchFailuresnow also limits the "didn't match expectation" lines logged when MockServer checks an HTTP/1.1 request againstrespondBeforeBodyexpectations before its body arrives. That check logged a line for everyrespondBeforeBodyexpectation it tried, with no limit, and when none of them answered the request, the request's normal matching then logged them again. A request answered by arespondBeforeBodyexpectation now logs the expectations it was checked against within the limit, then the "matched expectation" line; any other request is logged once, by its normal matching (#3020)- (Release) The release preflight now checks the NuGet API key live on nuget.org instead of only checking that the secret exists. It flags a key that has expired or been revoked, or that cannot push
MockServerClientorMockServer.Testcontainers. nuget.org now limits API keys to 30 days, and an expired key failed both NuGet publish jobs in...
MockServer 9.3.0
[9.3.0] - 2026-11-15
Security
- Release image and Helm chart signing can no longer be skipped. A release used to publish Docker images and the Helm chart unsigned, without failing, when it could not find the cosign signing key (this is how the 8.0.0 images and chart shipped unsigned). The release now checks the key before it publishes anything and stops if the key is missing or unusable. The
mockserver/mockserver-webhookimage on ECR Public is now signed too - (Release) Every toolchain image the release runs in is now pinned by digest, not only by tag, so re-pushing a tag cannot change what a release runs. This includes the community
alpine/helmandmaniator/ghimages, which receive the signing key and the GitHub token. The pins live inscripts/release/images/Dockerfile, which Dependabot keeps current in one PR that is never merged automatically and only refreshes digests or moves to a patch release on the same line. The VS Code extension is now packaged and published with the@vscode/vsceandovsxversions locked in itspackage-lock.json, instead of the latest versions installed globally in the container that holds the marketplace tokens, and the PyPI packages are built and uploaded withbuild,twineandsetuptoolsinstalled from a hash-pinned requirements file (scripts/release/requirements-publish.txt) rather than the latest versions. The npm release ofmockserver-nodeandmockserver-client-nodenow installs from their committed lockfiles (npm ci), updating only the entries the release itself changes, instead of deleting the lockfile, resolving every dependency afresh and runningnpm audit fixbefore publishing. The .NET client and Testcontainers packages are now restored in locked mode from committed NuGet lock files (packages.lock.json) - With
proxyAuthenticationUsernameandproxyAuthenticationPasswordset, a client could use MockServer as a proxy without credentials by opening its connection the way MockServer's ownCONNECTand SOCKS tunnels open theirs internally. MockServer now accepts that opening only on its own internal tunnel connections. The forward allow, deny and private-network rules were not affected, andCONNECT, SOCKS and plain proxy requests sent with credentials work as before. Present since 5.11.0 (fixes GHSA-36c2-h3v8-7w6w) - With
proxyAuthenticationUsernameandproxyAuthenticationPasswordset, SOCKS5 clients could proxy without credentials by offering "no authentication", SOCKS4 clients were never asked for credentials, and HTTP/3 CONNECT-UDP tunnels were opened without checking theProxy-Authorizationheader. SOCKS5 now selects username/password authentication whenever the client offers it and refuses a client that does not (replying0xFFand closing the connection), SOCKS4 is refused (it cannot carry a password) with a warning in the log, and HTTP/3 CONNECT-UDP now requires the proxy credentials, answering407without them. Without proxy credentials configured, SOCKS4, SOCKS5 and CONNECT-UDP behave as before, except that a SOCKS50xFFrefusal now also closes the connection. WithtransparentProxyEnabledalso set, MockServer now logs a warning at startup that connections handled as transparent proxying, including those whose destination comes from theHostheader or a PROXY protocol header, are not asked for proxy credentials (fixes GHSA-36c2-h3v8-7w6w) - With
proxyAuthenticationUsernameandproxyAuthenticationPasswordset, a plain HTTP proxy request for another host (a request line holding a full URL, such asGET http://example.com/path) without the credentials was still answered by a matching expectation, and was asked for them only when nothing matched; a WebSocket upgrade for another host was relayed to it without them; and the proxy WAR (mockserver-proxy-war) never asked for them. Such a request to the standalone server now gets407before it is matched against any expectation, a WebSocket upgrade for another host is relayed only with the credentials, and the proxy WAR asks for them before matching a request whoseHostnames another host. A request sent to MockServer directly (a request line holding only a path, as every HTTP/2 and HTTP/3 request is) is still matched without proxy credentials whatever itsHostheader says, and needs them only when MockServer would forward it; requests for MockServer's own address never need them. A request refused this way is logged as a failed proxy authentication, as a refusedCONNECTis, not as a received request, so it does not count inverifyorretrieveRecordedRequests. The WAR (mockserver-war) cannot see whether a request line held a full URL, so there every request is handled like one sent to MockServer directly. Without proxy credentials configured nothing changes - Build-time dependency fixes, none shipped in a published package: the Maven plugin's integration-test projects now pin Guava 33.8.0-jre, the version the main build uses (GHSA-xxph-c9ww-hj94 was fixed in 33.7.2), the VS Code extension's development lockfile resolves
qs6.16.1 (GHSA-6pq8-jhm2-2vcw; it reaches the build only through@vscode/vsce→typed-rest-client), and the Rust client's lockfile resolvesrustls0.23.46 (GHSA-vp88-798v-h67f, GHSA-w44r-93j7-qv28, GHSA-c8m5-c952-6cm4, GHSA-h2v8-394m-p7vv; the client uses native TLS, sorustlsis listed in its lockfile but not compiled into it). The development lockfiles of the Node client,mockserver-node, the dashboard UI and the VS Code extension now resolveminimatch11.0.3 (GHSA-g3hv-75wg-m249) for every copy that contains the affected code: underc8→test-excludein the Node client, throughmockserver-node'sglobdevelopment dependency (now 14.0.3), foreslintand its plugins in the dashboard UI and under@vscode/vscein the VS Code extension. All butmockserver-nodeuse npmoverrides, because no release of those tools acceptsminimatch11 yet. Theminimatch3.x copies thatgruntandjshintstill pull in do not contain the affected code. The development lockfiles of the Node client andmockserver-nodenow also resolvelodash4.18.1 for the copy underjshint(GHSA-f23m-r3pf-42rh), through an npmoverridesentry becausejshintaccepts onlylodash4.17.x;jshintdoes not call the affected_.unset,_.omitor_.pullAt - The standard image (
mockserver/mockserver, built fromdocker/local), the-aotimage and the referencedocker/Dockerfileimage now run ongcr.io/distroless/java-base-debian13:nonrootinstead ofjava-base-debian12. Distroless stopped buildingjava-base-debian12in February 2026 (GoogleContainerTools/distroless#2023), so its pinned digest could no longer pick up Debian security fixes; the new base shipslibbrotli11.1.0-2+deb13u1, fixing CVE-2026-111497 (DSA-6582-1), and is the same Debian release as the other image variants (#2927) - The Node Testcontainers module's lockfile now resolves
glob14.0.3 andminimatch11.0.3 underarchiver, a runtime dependency of the published@mockserver/testcontainerspackage (GHSA-3g3m-2fjr-6pw4, GHSA-g3hv-75wg-m249). The fix uses npmoverrides, which npm does not apply when another project installs the package, so a project that depends on@mockserver/testcontainersresolves these from its own lockfile untilarchivermoves to the patched releases; it can add the sameoverridesitself. The module does not reach the affected code:archivercopies a directory without a glob pattern, and the affectedglobcopy is used only by anarchiver-utilshelper thatarchiverdoes not call - The forward-target checks (
forwardProxyBlockPrivateNetworks,forwardProxyAllowedHosts,forwardProxyDeniedHosts) could be sidestepped by a destination an upstream proxy reads differently from MockServer. ThroughforwardHttpProxythe proxy's request line was built from the rawHostheader and path, so aHostsuch as8.8.8.8:80@169.254.169.254orallowed?.example.com, a secondHostheader, or a path not starting with/could send the proxy to a host that was never checked. A plain HTTP request sent throughforwardHttpProxynow needs exactly oneHostheader (without one, the client address is used) that is a host name, IPv4 address or bracketed IPv6 address with an optional port, and is otherwise refused with502 Bad Gatewayeven when no check is set; its path always starts with/, spaces and control characters in it, Unicode ones included, are percent-encoded except CR and LF, which are still refused, andOPTIONS *is sent asOPTIONS http://<host>/rather than with*appended to the host. ThroughforwardHttpsProxyorforwardSocksProxy, a request whose tunnel destination is not a host of that form is refused before connecting, and so is a binary (non-HTTP) connection tunnelled through any of the three upstream proxies, whose destination previously reached the proxy as given (aforwardProxyAllowedHostsentry*.allowed.comletsecret.internal.example/.allowed.comthrough). A PROXY protocol v1 header whose destination is not an IP address of the family it declares (TCP4orTCP6), such as a host name, is now ignored as malformed, as the PROXY protocol requires. Where a check is set, a numeric IPv4 host that is not four decimal octets without leading zeros (0177.0.0.1,0x7f.1,2130706433), which resolvers may read as another address, is refused, as is a forwarded request whose destination host or port cannot be read, and an IPv6 address whose dotted IPv4 part has a leading zero ([::ffff:017.0.0.1]) is refused too.forwardProxyBlockPrivateNetworksand address entries inforwardProxyAllowedHosts/forwardProxyDeniedHostsnow check the IPv4 address inside an IPv4-compa...
MockServer 9.2.0
[9.2.0] - 2026-10-26
Security
- In the
mockserver-netty-no-dependenciesjar and the Docker images, the bundled Kafka client used for AsyncAPI mocking now refuses theJndiLoginModuleandLdapLoginModuleJAAS login modules in asaslJaasConfig, as Kafka does by default since CVE-2023-25194. The jar renames the libraries it bundles, and the renaming changed the module names Kafka checks against, so the check never matched (#2869) - With
dataPlaneAuthenticationRequiredon, a mocked endpoint could still be reached without credentials in several ways. A path that only starts with/mockserver(such as/mockserverfoo), or a/mockserver/...path that the server does not handle (such as/mockserver/nope, or/mockserver/statusand/readyover HTTP/3), skipped the check and was answered by any matching expectation, a catch-all one included. Over HTTP/1.1, an expectation withrespondBeforeBodyanswered the first request on a connection without checking credentials. And a gRPC bidirectional-streaming expectation (respondWithGrpcBidi) answered over HTTP/2 or HTTP/3 without checking them. gRPC server reflection also answered without credentials, listing the loaded services and message types, and so did a gRPC chaos fault and theUNIMPLEMENTEDanswer for an unknown gRPC method, which told the caller which methods exist. All of these are now refused (401, or gRPC statusUNAUTHENTICATED) like any other mocked endpoint. A refused request does not use up the expectation'sTimes, move its scenario on or count towards a gRPC chaos profile. The control plane, the readiness and liveness probes (the gRPC health check included), and CORS preflights for the control plane still work without data-plane credentials. Data-plane authentication does not apply to DNS mocking dataPlaneAuthenticationRequirednow applies to the WAR deployments (mockserver-war,mockserver-proxy-war) and toInProcessMockServer, which served their mocks without credentials whatever it said. Credentials are checked before a request can match an expectation, so a refused request uses up noTimesand moves no scenario, and a CORS preflight for a control-plane route stays open, as on the standalone server. An in-process request carries its credentials in its headers. In a WAR,tlsMutualAuthenticationRequiredis now enforced too: a mocked request over plain HTTP gets426 Upgrade Required, and one over HTTPS without a client certificate verified by the servlet container gets401; the container's trust store decides which certificates are accepted (see upgrading to 9).- The Kafka SASL JAAS configuration for AsyncAPI broker mocking can now only be set at startup, with the new
asyncKafkaSaslJaasConfigproperty (-Dmockserver.asyncKafkaSaslJaasConfigorMOCKSERVER_ASYNC_KAFKA_SASL_JAAS_CONFIG). A JAAS configuration names the Java login class the Kafka client loads, andPUT /mockserver/asyncapilet any control-plane caller choose it throughbrokerConfig.kafkaSecurity.saslJaasConfig. That request is now rejected with a400that names the startup property, and so is any other field inkafkaSecuritythat MockServer does not know, so no Kafka client setting that loads a class can be passed in;saslMechanismandsecurityProtocolmust be one of Kafka's own values. A request that selectsSASL_PLAINTEXTorSASL_SSLuses the startup JAAS configuration (or the JVM's own JAAS file). Because every SASL login is now held by the server, such a request may only use the startupasyncKafkaBootstrapServers: it must omitkafkaBootstrapServersor name the same brokers, or it gets a400and no credential is sent, and it gets a400while no startup bootstrap servers are set.asyncKafkaBootstrapServerscan now only be set at startup:PUT /mockserver/configurationignores it and logs a warning.PUT /mockserver/configurationignoresasyncKafkaSaslJaasConfigand logs a warning, andGET /mockserver/configurationnever returns it. To upgrade, move thesaslJaasConfigvalue from your requests toasyncKafkaSaslJaasConfig, setasyncKafkaBootstrapServersat startup to the brokers it logs in to, and keepsecurityProtocolandsaslMechanismin the request (see upgrading to 9) retrievewithforwardUnmatchedTonow needs a control-plane role that may change state. The parameter repoints where unmatched requests are forwarded, but control-plane authorization treated the call as a read, so withcontrolPlaneAuthorizationEnableda principal with only theREADrole could redirect unmatched traffic. Such a principal now gets403, as it already did forextractBodiesLargerThan; aretrievewithout either parameter is still a read (see upgrading to 9)- Upgraded DOMPurify (dashboard UI dependency) to 3.4.17 to fix GHSA-cg2g-xh64-v4q7
- Build-time dependency fixes, none shipped in a published package: the Node Testcontainers module's own development lockfile resolves
undici7.30.1 (Dependabot alerts 610, 611, 612; the published package ships onlydist), and the VS Code extension's development dependency@vscode/vscenow resolves@azure/msal-node7.1 through an npmoverridesentry (alert 613; it reaches the build only through@vscode/vsce→@azure/identity, which has no release that allows msal-node 7 yet) - The paths MockServer writes files to, and the
protocexecutable it runs, can now only be set at startup:auditLogFile,persistedExpectationsPath,persistedRecordedExpectationsPath,persistedRecordedRequestsPath,memoryUsageCsvDirectoryanddirectoryToSaveDynamicSSLCertificate, likerecordedBodyFilesDirectory. Before,PUT /mockserver/configuration(or a client'supdateConfiguration) could change them on a running server, so anyone who could reach the control plane could redirect the audit log (before its first write) or the generated certificates and their private keys into another directory, such as one on the extension classpath, or point aformat=recordingdisk import (which readspersistedRecordedRequestsPath) at another file.grpcProtocPath, which names theprotocexecutable MockServer runs, is now startup-only for the same reason. APUTthat sets a different value is still answered, but the value is ignored and a warning is logged; aPUTthat sends the value already in force logs nothing. Set them with a system property, environment variable, properties file orConfigurationinstead (see upgrading to 9) - The settings that decide who may use the control plane, what each user may do, whether control-plane changes are audited, and where dashboard usage events go can now only be set at startup:
controlPlaneTLSMutualAuthenticationRequired,controlPlaneTLSMutualAuthenticationCAChain, thecontrolPlaneJWTAuthentication*andcontrolPlaneOidc*settings,controlPlaneAuthorizationEnabled,controlPlaneScopeMapping,controlPlaneAuditEnabledanddashboardAnalyticsEndpoint, like thecontrolPlaneBasicAuthentication*settings. Before, anyone allowed to change the configuration withPUT /mockserver/configurationcould switch control-plane authentication off, trust their own keys or identity provider, give themselves a role, switch auditing off before making changes, or send every dashboard viewer's usage events to their own server. APUTthat sets a different value is still answered, but the value is ignored and a warning is logged, andGET /mockserver/configurationreports the value in force; the dashboard's Audit Trail view no longer has an on/off switch (see upgrading to 9) - A
PUT /mockserver/configurationthat changes where the default LLM backend sends requests (llmBaseUrl, orllmProviderwhilellmBaseUrlis empty) without also supplyingllmApiKeynow clears the held key and logs a warning, so the key is never sent to the new endpoint. Before, anyone allowed to change the configuration could collect the key by pointingllmBaseUrlat their own server. APUTthat supplies both applies both; a JSONllmBackendsConfigvalue that changes a backend'sbaseUrlorproviderwhile leaving its key masked is not applied (see upgrading to 9) - A held secret is no longer sent to a destination that a control-plane caller can choose.
clusterVerifyFanInPeersandclusterFanInPeerAuthTokencan now only be set at startup:PUT /mockserver/configurationcould repoint the fan-in peers at any host, and every verify or retrieve then sent it the cluster peer token, which grants write access to every node. APUTthat supplies a different value is ignored and logs a warning. Thedetect_llm_driftMCP tool, which a read-only caller may use, now refuses a cassette whoseprovideris not the configured LLM backend's provider and sends nothing; before, it replayed the cassette with that provider's client, which, when nollmBaseUrlwas set, sent the heldllmApiKeyto that provider's default host. AnAZURE_OPENAIbackend with nollmBaseUrlnow sends nothing, instead of sending its key to the placeholder hostexample-resource.openai.azure.com. See upgrading to 9. noProxyHostscan now only be set at startup, like the upstream proxies it applies to (forwardHttpProxy,forwardHttpsProxy,forwardSocksProxy). Before, anyone allowed to change the co...
MockServer 9.1.0
[9.1.0] - 2026-10-21
Security
- Control-plane mTLS could be bypassed by sending the CA certificate after an untrusted client certificate. With
controlPlaneTLSMutualAuthenticationRequiredon, MockServer 5.13.0 to 9.0.0 accepted a control-plane request if any certificate the client sent could be validated againstcontrolPlaneTLSMutualAuthenticationCAChain. A CA certificate is public, so anyone who could reach the control plane could send their own certificate followed by your CA certificate and create, read or delete expectations, change the configuration or reset the server, without the CA's private key. Also requiring data-plane mTLS (tlsMutualAuthenticationRequired) did not prevent this in the default set-up: the data-plane check also trusts MockServer's own CA, which by default is the CA bundled with MockServer, and its private key is published in the jar, so an attacker could sign their certificate with it. Data-plane mTLS prevented it only if MockServer had its own CA (certificateAuthorityCertificateandcertificateAuthorityPrivateKey, ordynamicallyCreateCertificateAuthorityCertificate) and every CA intlsMutualAuthenticationCertificateChainwas private. MockServer now checks only the client's own certificate (the one whose private key it used for the connection): it must be signed by a CA in the chain, directly or through intermediate CA certificates the client sends after it, be in date, allow digital signatures if it lists key usages, allow client authentication if it lists extended key usages, and not be a CA certificate, a self-signed certificate or one of the certificates in the chain. A self-signed client certificate listed incontrolPlaneTLSMutualAuthenticationCAChainis no longer accepted; sign client certificates with a CA instead. AcontrolPlaneTLSMutualAuthenticationCAChainthat contains the bundled CA (or any certificate for its key) is now refused: MockServer does not start,PUT /mockserver/configurationanswers400, and any other change makes every control-plane request fail, where before only a warning was logged. If MockServerClient and MockServer share that property in one JVM (for exampleClientAndServeror the JUnit rule) and you added the bundled CA so the client trusts MockServer's certificate, give MockServer its own CA withcertificateAuthorityCertificateandcertificateAuthorityPrivateKeyand put that CA in the chain instead. The control-plane audit log now records the validated client certificate's subject as a verified principal (verified-mtls) unless OIDC supplied one; with mTLS and JWT both on, the audit principal is now the certificate subject instead of the unverified JWTsub. If a MockServer reachable by others had control-plane mTLS on, with or without data-plane mTLS, treat its expectations, recorded traffic and settings as possibly read or changed by someone else (fixes GHSA-52vf-hgvq-8pr3) - mTLS (
tlsMutualAuthenticationRequired) no longer accepts client certificates anyone can create (BREAKING for mTLS set-ups that use MockServer's default CA; see upgrading to 9). Up to 9.0.0, MockServer trusted client certificates signed by MockServer's own CA whenever mTLS was on, even withtlsMutualAuthenticationCertificateChainset. By default that CA is the one bundled with MockServer, and its private key is published in the MockServer jar, so anyone could create a client certificate, with any name, that MockServer accepted. That client also matched any client certificate condition in your expectations and, when control-plane authentication was off, could create, read or delete expectations. MockServer now never trusts the bundled CA for mTLS. If mTLS is on and nothing but the bundled CA would be trusted, ortlsMutualAuthenticationCertificateChaincontains the bundled CA, MockServer does not start,PUT /mockserver/configurationanswers400, and the message names the fix: give MockServer its own CA withcertificateAuthorityCertificateandcertificateAuthorityPrivateKey, setdynamicallyCreateCertificateAuthorityCertificate=true, or settlsMutualAuthenticationCertificateChainto the CA that signs your client certificates. With a chain set and the default CA, MockServer now trusts only the chain. For a throwaway local test, the newtlsMutualAuthenticationAllowBundledCa=truerestores the old behaviour, and a warning is logged whenever the bundled CA becomes trusted (at startup, when a configuration change makes it trusted, and when the TLS context is rebuilt). This applies to HTTPS and HTTP/3. If a MockServer reachable by others relied on mTLS with the default CA, treat its expectations and recorded traffic as possibly read or changed by someone else (fixes GHSA-52vf-hgvq-8pr3) - Dashboard: a crafted dashboard link can no longer make the dashboard reset, clear or stop the MockServer that serves it. The dashboard reads
?host=,?port=and?basePath=from its own address and used them unchecked to build every call it makes to MockServer, so a link such as…/mockserver/dashboard?basePath=/mockserver/reset%23turned the dashboard's next routine call into/mockserver/resetas soon as someone opened it. These values now go through the same checks as a server typed into Set MockServer: a host must be a plain host name or IP address (no scheme, path,@or#), a port a number from 1 to 65535, and a base path a plain path (no?,#,%,\,//or./..segments). An invalid value is ignored, the dashboard uses the server that served it instead, and a warning at the top of the dashboard names what was ignored. A valid link that points the dashboard at a server on a different host now shows a warning naming that server, because what you create in the dashboard is sent there, with a button to switch back to the server that served the page; that server no longer decides whether dashboard analytics are on (the server that served the page still does). Valid links on the same host, such as?port=1080or?basePath=/mock, work as before with no warning. A dashboard served behind a proxy under a path containing a percent-encoded character (for example a space) now falls back to the root path, with the same warning; pass?basePath=to set it. The stricter base-path check also applies to Set MockServer, and a saved workspace target whose base path contains%or\is dropped, so that workspace follows the dashboard's address again - Load scenarios: a
STAIRSload shape with a hugestepsvalue (for example2147483647) could exhaust the server's memory when it was loaded withPUT /mockserver/loadScenario, before the stage limit was checked. A shape is now checked against the stage limit (loadGenerationMaxStages, 20 by default) before it is expanded, and rejected with400 Bad Requestif it is too big; no shape can expand to more than 10,000 stages. Stage durations so large that their total wrapped past the maximum run duration are now rejected too, and so isNaNorInfinityin any number in a load scenario (stage rates, shape parameters, step weights, the pacing value and thresholds); before, aNaNstep weight made a weighted scenario fail once it ran. AVUshape value too big for a whole number of virtual users is now rejected by the virtual-user limit instead of silently wrapping to a small or negative count - Node, Python, Go, Rust and .NET clients: the callback and breakpoint WebSocket now carries the client's configured control-plane bearer token as
Authorization: Bearer <token>, as control-plane HTTP calls already did, so callbacks and breakpoints keep working when MockServer requires JWT or OIDC control-plane authentication on that WebSocket. A token supplier is asked for a fresh token on each connection, including the Node and Python clients' reconnects. With no token configured nothing is sent, and a MockServer that does not require authentication ignores the header. In a browser the Node client cannot send it, because browsers do not let a page set headers on a WebSocket and MockServer accepts the token only in that header; use mutual TLS for browser callbacks and breakpoints when control-plane authentication is on. The Ruby client has no control-plane token option and the PHP client has no callback WebSocket, so neither changes - Log lines can no longer be forged through request data. The forward circuit breaker's log messages (which name the upstream, which can come from a request's
Hostheader or HTTP/2:authority) and the LLM conversation matcher's debug messages (which quote the request body) now write carriage returns, line feeds and other control characters as escapes such as\rand\n, so a crafted request cannot start a new log line - By default, web pages on other sites can no longer use MockServer's API or WebSockets from your browser (BREAKING; see upgrading to 9). Since 7.0.0, MockServer's own API (every
/mockserver/...path, including MCP and metrics), the dashboard's live log and the callback WebSocket answered any web page, so a site you visited while MockServer was running could read recorded traffic, add or change expectations, and reset or stop the server. A new property,controlPlaneCorsAllowOrigin, now decides which browser origins may use them. Left blank (the default), it allows pages onlocalhost,127.0.0.1or[::1](http or https, any port) and pages MockServer serves itself, such as the dashboard, when MockServer is reached by a name DNS rebinding cannot take over (see the next entry); set it to a comma-separated list of origins (or*) to allow others. It can only be set at star...
MockServer 9.0.0
[9.0.0] - 2026-10-15
This release delivers a sustained performance and memory programme alongside data-integrity fixes under load, plus a large set of LLM-provider correctness fixes, dashboard improvements, and client-library parity work. Headline numbers from the single-load-generator benchmark on the same six-core rig (builds 420 and 464): the healthy ceiling rises from 39,033 to 57,149 req/s and the peak from 43,671 to 59,905 req/s, with p95 at 32,000 req/s falling from 56.6 ms to 0.44 ms on the new ZGC default in the Docker images; event-log retained heap at 20,000 entries falls from 429 MB to 61 MB; Docker image download shrinks ~23%; and instance shutdown drops from ~107 ms to near zero. 22 BREAKING changes affect HTTP/3, DNS mocking, binary (non-HTTP) proxying and binary expectation matching while proxying, template-failure response codes, maxLoggedMatchFailures's default, initialisation-file id conflicts, the Node client's TypeScript typings and exports map, LOG_ENTRIES log output, control-plane error handling and mTLS, the Rust client's enums, verification-failure wording, response statusCode validation, AsyncAPI and response/OpenAPI verification, GenAI trace span names, the Node client's recorded-request typings, and the Go client/Testcontainers module's /v9 module paths — see Upgrading from 8.0.0 and the BREAKING entries under Changed. For a per-change migration list, see the upgrade guide at https://www.mock-server.com/mock_server/upgrading_to_9.html.
| Metric | Before | After |
|---|---|---|
| Throughput, healthy ceiling / peak (req/s, 6 cores) | 39,033 / 43,671 | 57,149 / 59,905 |
| p95 latency at 32,000 / 48,000 req/s offered | 56.6 ms / 82.4 ms | 0.44 ms / 12.0 ms |
| Event-log heap (20,000 entries) | 429 MB | 61 MB |
| Docker image download (linux/arm64, standard image) | ~167 MB | ~129 MB |
| Instance shutdown time | ~107 ms | ~0 ms |
"Before" is perf build 420 (commit d568695, 2026-09-24, JDK 17.0.20, G1 collector), measured nine days after the 8.0.0 tag and already carrying some of this release's own work, since 8.0.0 itself was never measured on this rig. "After" is perf build 464 (commit efdc522, 2026-09-27, JDK 25, ZGC), the performance page's single-load-generator figures; the page's headline is now a different, multi-generator measurement (see Changed). Both are comparable with each other but not with any benchmark published after this release.
Upgrading from 8.0.0
- Go client and Go Testcontainers module users: both modules move to
/v9module paths (the Go module proxy refused their 8.0.0 tags) — rungo get github.com/mock-server/mockserver-monorepo/mockserver-client-go/v9(and the Testcontainers module's/v9path if you use it) and change your
imports from the/v7/unsuffixed paths to the/v9ones; see Changed. - HTTP/3 users (
http3Portset): the QUIC native library now ships separately — use the-jar-with-dependencies-http3jar or themockserver/mockserver:<version>-http3Docker image (latest-http3,snapshot-http3; Helm:image.variant=http3), and a server that cannot serve HTTP/3 (missing
native, or the port unusable) now refuses to start instead of silently falling back. - DNS mocking users (
dnsEnabled=true): MockServer now refuses to start if itsdnsPortcannot be bound, instead of logging a warning and running without DNS. LeavednsPortat its default of0to let the OS pick a free port, or setdnsEnabled=false. - TypeScript users of
mockserver-client/llm: the deep-import typings no longer declare a default export; import frommockserver-clientitself, useimport llm = require(...)/import * as llm from ..., or turn onesModuleInterop(see Changed). - Binary (non-HTTP) proxy users: a client connection now always keeps one upstream connection for its whole life — forwarding one message per upstream connection is removed, along with its
forwardBinaryRequestsWithoutWaitingForResponsesetting (a value still set is ignored, with a warning); remove it from your configuration. - Anyone reading a request or response body from
message/argumentsofLOG_ENTRIESoutput (including the MCPretrieve_logs/raw_retrievetools): read it from the entry'shttpRequest/httpResponseinstead —message/argumentsnow refer to that request/response by a short form
such as"POST /orders"or"201". - Anyone treating a control-plane
400as any failure, or catching the Java client'sIllegalArgumentExceptionfor non-input failures: an unexpected server-side fault is now a500with a generic message and correlation id;400is now reserved for requests MockServer genuinely rejects. The
Java client'sretrieveLogsByCorrelationIdandretrieveActiveExpectations(requestDefinition, format)now throw instead of returning the error's text. - Anyone importing a path inside
mockserver-client/mockserver-nodeother than the package or a documented module: both packages now have anexportsmap, so an unlisted path (.d.tsfiles,tasks/mockServer.js, etc.) now fails to resolve — resolve<package>/package.jsonand join a file's
path to that directory if you need one by location. - Control-plane mTLS, Java client: the client now trusts only
controlPlaneTLSMutualAuthenticationCAChainfor MockServer's certificate; add MockServer's own CA to that chain if it signs the server certificate. - Control-plane mTLS, server: MockServer now accepts only client certificates signed by
controlPlaneTLSMutualAuthenticationCAChain; add MockServer's own CA to the chain if it signs your client certificates (or use your own CA if it's the bundled default), and MockServer now refuses to start with
mTLS required, no chain set, and the bundled default CA — set the chain or configure your own CA withcertificateAuthorityCertificate/certificateAuthorityPrivateKey. - Rust client users who
matchon its enums: every public enum is now#[non_exhaustive](add a wildcard arm), and server-sent enums (ResponseMode,BinaryUpstream,CrossProtocolTrigger, theLoad*enums) gain anUnknownvariant that cannot be sent back;LoadThresholdMetricalso gains
CheckFailureRate. - Anyone asserting the exact text of an over-count verification failure (
never(),exactly,atMost,between,verifyZeroInteractions): the message now reads "found … but should have been found …" instead of "not found". - Anyone with a response
statusCodeof0or outside 100–999 (most likely from a blank 8.0.0 dashboard status field): it is now rejected at creation with a400, or skipped with aWARN(naming it) when loaded from an initialization/persisted-expectations file, with the file backed up first. - AsyncAPI verification users (
PUT /mockserver/asyncapi/verify, or the Java client'sverifyAsyncMessage): putatLeast/atMost/exactlyinsidecount, not at the top level — the endpoint now answers400for unknown fields instead of ignoring them. - Anyone verifying a response body with a regex, JSON path, JSON Schema, XPath, XML Schema, form, multipart, fuzzy, GraphQL, JSON-RPC, WASM or allOf matcher: that matcher is now actually applied, where it was previously ignored (verification passed whenever any recorded response had a JSON object
body). - Anyone verifying requests with an OpenAPI matcher: only requests for the matched
operationIdnow count, instead of every recorded request (verifySequencewas unaffected). - Anyone selecting LLM completions by
gen_ai.operation.name == "chat": Gemini calls are nowgenerate_content, and prompt-string completions (legacy/v1/completions, Mistral FIM, Ollama/api/generate, prompt-based Bedrock InvokeModel models) are nowtext_completion— update to match
chat,generate_contentandtext_completiontogether. - TypeScript users of the Node client's
retrieveRecordedRequests/retrieveRecordedRequestsById: now typedPromise<RequestDefinition[]>instead ofPromise<HttpResponse[]>; narrow each result toHttpRequestbefore reading HTTP-specific fields. - Anyone proxying binary (non-HTTP) traffic while binary expectations are registered on the same MockServer: a message matching a binary expectation is now answered by it and not forwarded, by default (
matchBinaryExpectationsWhenProxying); set it tofalseto always forward as in 8.0.0. - Anyone relying on every "didn't match" comparison being logged: the new
maxLoggedMatchFailuresproperty now defaults to50, so atINFOonly the first 50 "didn't match" entries per request are logged; setmaxLoggedMatchFailures=-1to keep logging every comparison. - Anyone with expectations in an
initializationJsonPathfile whoseids repeat: the file now keeps the last expectation for each repeatedid, not the first; remove the repeatedids, or put the one you want last. - Anyone relying on a failed template answering
404/502: a response/forward template that fails, or whose output isn't valid, now answers500by default (templateFailureAsServerError); set it tofalseto keep the 8.0.0 answers.
Also worth checking, though none is a breaking change: if you override the standard Docker images' ENTRYPOINT or copy the jar out of them, /mockserver-netty-jar-with-dependencies.jar is now split into /mockserver.jar and /mockserver-deps.jar — use -cp /mockserver.jar:/mockserver-deps.jar:/libs/* (java -jar /mockserver.jar still runs, but without the CDS start-up archive, so it starts more slowly); with forwardProxyBlockPrivateNetworks on, a request that matches no expectation and whose Host header names MockServer itself by a name it doesn't recognise as its own (a Docker Compose or Kubernetes service name, for example) now gets 502 Bad Gateway instead of 404 Not Found, because that name resolves to a private address — add the name to noProxyHosts, or set `attemptToPro...
MockServer 8.0.0
[8.0.0] - 2026-09-15
Added
- Test port allocation can opt into a fixed port band instead of the OS ephemeral range.
org.mockserver.socket.PortFactorynormally finds a free port withbind(0), which draws from the same
ephemeral range (on macOSnet.inet.ip.portrange.hifirst..hilast, typically 49152-65535) that every other
bind(0)on the machine uses — including unrelated applications, IDE helpers, and other JVMs. On a busy
developer machine that causes two kinds of test flake: a foreign process can occupy a number a test is about to
choose, and a test can momentarily connect to that foreign listener instead of the server under test. Setting
bothmockserver.testPortRangeStartandmockserver.testPortRangeEnd(for example
-Dmockserver.testPortRangeStart=20000 -Dmockserver.testPortRangeEnd=40000) makesPortFactorychoose ports by
explicitly binding inside that band — which the OS does not itself hand out tobind(0)— retrying past any
number already in use. Both properties are unset by default, so continuous integration and any machine that does
not set them keep the exactbind(0)behaviour as before. This affects only test port selection; it does not
change how MockServer binds its own ports at runtime (starting on port0and reading back the assigned port
remains the fully race-free option and is unchanged). In a surefire/failsafe fork the two properties must reach
the fork, e.g. via-Dmockserver.testArgLine="-Dmockserver.testPortRangeStart=20000 -Dmockserver.testPortRangeEnd=40000".
Changed
- HTTP/2 now gives every request stream its own channel. MockServer's HTTP/2 server — both
h2(over TLS) and
cleartexth2c— now uses Netty's stream-multiplexing model for every connection, replacing the previous
shared-connection HTTP/2 pipeline. Each HTTP/2 stream is processed on its own isolated child channel. This
removes a class of cross-stream interference on busy connections: concurrent streaming responses (Server-Sent
Events, NDJSON, AWS Bedrock event-stream, and therefore all streaming LLM responses) can no longer have a later
chunk of one stream mis-routed onto another, and each stream's end-of-stream is delivered independently, so a
slow or streaming response on one stream cannot stall another. This model was previously used only when
grpcBidiStreamingEnabledwas set; it is now the standard HTTP/2 pipeline and needs no configuration — so the
HTTP/2 correctness fixes listed below apply to all HTTP/2 traffic, not only when that flag is enabled. There is
no change to the REST/Java API, to how expectations are written, or to HTTP/1.1 and HTTP/3 traffic, and HTTP/2
clients receive the same responses. Users driving very large numbers of concurrent streams over a single
connection may notice different memory and throughput characteristics, since each stream now has its own
lightweight channel. (GitHub issue #2669). - Behaviour change — over HTTP/2,
closeSocketnow ends the stream, not the connection. A per-expectation
ConnectionOptions.closeSocket/closeChannel(and theslowCloseDelayconnection-lifecycle chaos) applied
to an HTTP/2 request now closes only that request's stream; other requests in flight on the same connection
continue and complete normally. Previously it tore down the whole TCP connection, killing every concurrent
stream on it — so one expectation could destroy unrelated clients' in-flight requests. Ending a single stream
is the correct HTTP/2 semantic and is what the same expectation already did over HTTP/1.1, where a connection
carries one request at a time. If you rely oncloseSocketto tear down an HTTP/2 connection — for example
to test how your client recovers from a dropped connection — use theresetMidResponseconnection-lifecycle
chaos fault instead, which still aborts the whole TCP connection (that is its purpose, and it now does so
properly rather than degrading into a single-stream reset). HTTP/1.1 and HTTP/3 behaviour is unchanged.
(GitHub issue #2669). - BREAKING:
mockserver-bomnow manages only MockServer's ownorg.mock-servermodules — it no longer pins
the third-party libraries MockServer uses internally. The published BOM previously baked in MockServer's
entire parentdependencyManagement(~190 third-party entries — Jackson, Netty, Guava, Nimbus, Velocity, and
more), four of them attestscope. Because a BOM's managed versions and scopes apply to whoever imports it,
this silently overrode a consumer's own versions and scopes for those shared libraries. For example, a
project that declaredcom.nimbusds:oauth2-oidc-sdkwithout a scope had it forced onto the test classpath
by MockServer's internal test-scoped pin, so the dependency disappeared from compile/runtime and the
consumer's production code failed to build against it (GitHub issue #2684). The published BOM now contains
only the MockServer module entries (24, down from 221), so importing it never changes any third-party version
or scope in your build. What you need to do: if you importedmockserver-bomto align MockServer's
transitive third-party versions — for instance to satisfy the Maven EnforcerdependencyConvergencerule —
those pins are gone and convergence errors may reappear; manage the affected third-party versions yourself in
your owndependencyManagement, or import each upstream project's own BOM. Aligning the MockServer modules
themselves is unchanged: keep importing the BOM and declare MockServer artifacts without a version.
(GitHub issue #2684).
Fixed
- A SOCKS4a client (for example
curl -x socks4a://…) proxying through MockServer no longer hangs.
SOCKS4a is the SOCKS4 extension where the client sends the destination as a hostname instead of an
IPv4 address. MockServer decoded the request correctly but then echoed that hostname back into the
DSTIPfield of the SOCKS4 grant reply, which must be an IPv4 literal; the resulting error was thrown
while writing the reply, so the client never received one and blocked until it timed out (curl exit 28,
0 bytes) — for cleartext HTTP as well as for TLS. The reply'sDSTIP/DSTPORTare ignored by clients,
so a SOCKS4a grant now carries0.0.0.0:0; a classic SOCKS4 request (IPv4 literal) still echoes its
destination back unchanged. Plain SOCKS4 and SOCKS5 (socks5h://) were unaffected. - The command-line server now exits with a non-zero status code when it fails to start. Previously, if
MockServer could not start — most commonly because the requested port was already in use — the CLI logged
the error but still exited0, so a shell script or CI job that started MockServer got no failure signal
and carried on as though the server was up (typically failing later with a confusing connection error).
mockserver run/-serverPort(and theui,demo,proxy, andopenapisubcommands, which start a
server the same way) now exit1on a failed start. Usage errors that were already handled — an invalid or
missing port, an invalid host or log level — keep their existing exit code, so only the previously-silent
startup-failure case changes. - An HTTPS request that negotiates HTTP/2 (ALPN
h2) through MockServer's SOCKS proxy now works.
Previously, using MockServer as a SOCKS4/SOCKS5 proxy for anhttps://request that upgraded to HTTP/2
failed completely — the client received nothing (curl reportedCURLE_HTTP2, 0 bytes) — because MockServer
provisioned its internal relay for HTTP/1.1 before the tunnelled TLS connection had negotiated its protocol,
so the forwarded HTTP/2 frames were unparseable. SOCKS over HTTP/1.1, SOCKS over cleartext, and the HTTP
CONNECTproxy over HTTP/2 were unaffected and continue to work. MockServer now terminates the tunnelled TLS
in the relay and waits for its ALPN result before wiring up the connection, exactly as theCONNECTproxy
already did. This works on any port: rather than guessing from the destination port number (the earlier
fix inferred TLS only for ports ending in443, soh2to a TLS port such as993,465, or9999was
still mis-provisioned as HTTP/1.1), MockServer now classifies the first bytes the client sends through the
tunnel — a TLS record versus a cleartext HTTP request — and provisions the connection to match. As a result,
HTTP/2 over TLS through a SOCKS tunnel succeeds on any port, and a cleartext tunnel to a port that happens to
end in443is no longer mistaken for TLS. Cleartext HTTP/2 with prior knowledge (h2c) through a SOCKS
tunnel now works too — the last case left as HTTP/1.1 by the earlier fixes. The same first-bytes
classification now also recognises the HTTP/2 connection preface (PRI * HTTP/2.0…) after ruling out a TLS
record, and provisions cleartext HTTP/2 on both relay legs so the mocked response is served overh2c
(a curl--http2-prior-knowledgerequest through asocks5h://proxy, for example); anything that is not a
preface is still provisioned as HTTP/1.1, and when HTTP/2 is disabled (http2Enabled=false) the preface is
ignored and the tunnel falls back to HTTP/1.1, exactly as MockServer's own listener does. The HTTPCONNECT
proxy is unchanged, so cleartext HTTP/2 with prior knowledge throughCONNECTis still served as HTTP/1.1 —
that was never a working case and is unaffected either way. (GitHub issue #2685). - Starting the command-line server with port
0now reports and uses the actual OS-assigned
ephemeral port instead of0. Previouslymockserver run -p 0(or-serverPort 0) bound a real
ephemeral port but recorded the requested0, so the port a caller needs to reach the server was
not discoverable, andui -p 0/demo -p 0printed a dashboard/getting-started URL pointing at
localhost:0. MockServer now records the real bound port after startup and uses it for the
...
MockServer 7.6.0
[7.6.0] - 2026-08-17
Changed
- The three Kubernetes container-integration cases that need Java-built images —
helm_sidecar_injection
(admission-webhook sidecar injection),helm_clustered_convergence, andhelm_jgroups_dns_ping(both the
-clusteredInfinispan image) — now run blocking in CI instead of recording a skip. Previously the CI helm step
ran with no JDK and never built those images, so all three recorded an honest but permanent SKIP — coverage that
looked green while proving nothing. A new:maven: build container-test images (jars)step in the
mockserver-container-testspipeline builds themockserver-netty,mockserver-k8s-webhook, and
mockserver-state-infinispanjars from the tree (once, via the Maven-in-Docker reactor) and hands them to the
helm step as Buildkite artifacts; the helm step downloads them and does cheapdocker builds (a COPY into
distroless) to produce the-clusteredandmockserver-webhookimages, then runs the suite. The jars travel as
artifacts (~200 MB total) rather thandocker saved images (~1.3 GB), mirroring the node-launcher / WAR hand-off. Both
layers fail closed: the helm step exits non-zero if any jar artifact is absent, and the harness runs with
REQUIRE_CLUSTERED_IMAGE=true/REQUIRE_WEBHOOK_IMAGE=trueso an image that is expected-but-absent is recorded as a
FAILURE, never a skip — a skip in CI is now impossible. Localcontainer_integration_tests/integration_tests.sh
is unchanged for a developer without the images: it still records a comprehensible SKIP (no fail-closed flag set),
and the harness now also builds themockserver-webhookimage locally (build_webhook_docker) so the sidecar case
runs blocking in local dev too — it was never built by the harness before, so that case had always skipped.
Added
- Two new rules in the always-on
check-false-green-guards.shCI gate. Rule 4 fails the build if a CI step runs the
container-integration harness with the helm/k3d cases active but does not export bothREQUIRE_CLUSTERED_IMAGE=trueand
REQUIRE_WEBHOOK_IMAGE=true— the exact way the three image-dependent Kubernetes cases could silently revert to a green
SKIP. It is keyed on the step's behaviour (invokesintegration_tests.shwithoutSKIP_HELM_TESTS=true), not on a
filename, so a rename or a second helm-running step is covered automatically. Rule 5 fails the build if a
mockserver-coretest that performs a JVM-global logging side effect (reachingLogManager.readConfiguration's handler
reset()via the staticConfigurationPropertieslogging setters or a forced fresh<clinit>) is not in the
sequential-testsinclude list — the shape behind a release-blocking flake thatParallelStaticStateGuardTest
structurally cannot catch. Both rules fail closed on an empty corpus and carry a rotating allow-list. See
docs/operations/false-green-guards.md. - A
jarPathlauncher option and matchingMOCKSERVER_JAR_PATHenvironment variable formockserver-node, pointing
start_mockserverat a pre-provisionedmockserver-nettyjar-with-dependencies instead of downloading one from
Maven Central. When set, that exact jar is launched and no download is attempted; a configured-but-missing path is a
hard error (... refusing to fall back to downloading a release) rather than a silent fall-back to a released
jar, so a missing artifact fails loudly. Mirrors the existingMOCKSERVER_BINARY_BASE_URLbring-your-own-artifact
path for the standalone binary, and serves air-gapped/corporate installs as well as testing a locally-built jar
(jarPathtakes precedence overmockServerVersion/artifactory*; the option beats the env var). The Node launcher
integration tests now use it in CI: a new:maven: build node launcher jarstep builds the jar from the tree and
the launcher-test step downloads it as an artifact and launches it viaMOCKSERVER_JAR_PATH— so the suite finally
tests the repo's own code instead of the last release. Previously it ran a downloaded release chosen by
package.json's version, so amockserver-corefix could not green it and a regression could not red it; that
released jar also carried the shipped dynamic-CA generation race (fixed on master in4cff56e61) and flaked ~8% of
runs. The launcher step fails closed if the tree-built jar is absent rather than reverting to a download, and
localnpm testoutside CI is unchanged (with neither the option nor the env var set it still downloads as before). - A structural wire-contract test for the LLM provider codecs (
LlmCodecStructuralContractTest), breaking the
self-derivation weakness in the golden-file drift test.LlmCodecGoldenFileTestregenerates its golden bodies
from the codec itself (-Dmockserver.updateLlmGoldens=true), so a structural codec defect — a renamed field, a
wrong SSE event name, a droppedfinish_reason— bakes straight into its own golden and the byte-for-byte drift
test then passes forever, confirming only that the codec is consistent with itself (token counts were already
pinned separately byshouldEncodeCanonicalTokenUsageCounts; the bodies were not). The new test asserts the live
codec output against hand-authored expectations taken from each provider's published API schema — required
fields, JSON types, the enum discriminators each provider uses (object/type/finish_reason/stop_reason/
finishReason/status/done), the tool-call envelope shape (arguments as a JSON string for OpenAI/Responses
vs a structured object for Anthropic/Gemini/Ollama), and the exact SSE event-name sequence for the event-typed
providers — across all seven chat/completion providers (Azure and Bedrock via their delegate codecs). Crucially it
never reads the golden files and is unaffected by-Dmockserver.updateLlmGoldens=true, so regenerating goldens
cannot silence it. Each named defect class was injected into a codec and confirmed to turn the test red without
regenerating goldens (OpenAI renamedfinish_reason; Anthropic SSEcontent_block_delta→content_delta; Gemini
droppedfinishReason; Responses renamedstatus; Ollama renamed terminaldone), then reverted. Residual
streaming-over-the-wire behaviour remains covered byLlmAgentLoopE2eTest. - Endpoint-level test (
HttpStateCassetteEndpointTest) and an authoritativeCassetteRegistryjavadoc note pinning
the settled decision that loading and recording register a cassette automatically. Therecord_llm_fixtures
andload_expectations_from_fileMCP tools already auto-register the fixture in the process-wideCassetteRegistry
(keyed by file path, originrecorded/loaded, upserting on re-load/re-record) so it surfaces under
GET /mockserver/cassettesand in the dashboard's Cassettes tab without a manualPUT /mockserver/cassettes— but
nothing pinned that a so-registered cassette is actually retrievable through the GET endpoint, and the registration
policy lived only in the two MCP callers, inviting the question to be re-opened. The new test drives
GET /mockserver/cassettes(and the bare/cassettesalias) against a registry populated the way the load/record
handlers populate it and asserts the documented body shape (path, derived filename, expectation count, origin,
lastUsed), that record-then-load on one path yields a single upserted entry, and that a server reset clears it. The
MCP tools and consumer docs (ai_mcp_tools.html) already stated this behaviour; both are now clarified to say the
fixture is registered automatically. This closes the "CassetteRegistry auto-population" product-decision item by
recording the decision in code, docs, and a test rather than leaving it to resurface. - Compile gates for the dashboard composer's generated client code in Python, Ruby, Go and Rust
(.buildkite/scripts/steps/ui-client-codegen-compile.sh, wired intopipeline-ui.yml), closing the gap where
five of the composer's seven languages had no compile check — only Java (ui-java-codegen-compile.sh) and C#
(ComposerCodegenEquivalenceTests.cs) were gated, so an emitter bug or a client-API rename would ship broken
generated code to users caught by nothing (the existing per-language tests only string/byte-compare the emitter
output, never feed it to a compiler). Each gate drives the shared representative composer matrix
(extractParityCases.ts— the exactcombosthe byte-identity parity tests use) through that language's emitter
and runs the lightest credible toolchain check:python -m py_compileandruby -ccatch any emitter bug that
produces malformed source (the strongest static check for a dynamically-typed client with no shipped type stubs),
while Go (go build/go vet ./...) and Rust (cargo check) compile the generated code against the real
in-repomockserver-client-go/mockserver-client-rust, so a renamed client method fails the build — the direct
analog of the Javajavacgate. Node was already covered: thetsctype-proof innode.test.ts
(typecheck-node-codegen.mjs) runs undernpm test, so the orphaned-script concern was already resolved by that
test. All four new gates are proven to go red (emitter drift → non-zero exit) and green. Each phase runs in its
toolchain's Docker image viarun-in-docker.sh; setCODEGEN_COMPILE_USE_DOCKER=falsefor host validation. - Config-to-client wiring tests for the GCS and Azure blob-store backends
(GcsBlobStoreRegistrarConfigWiringTest,AzureBlobStoreRegistrarConfigWiringTest), closing the gap where
only S3 (S3BlobStoreRegistrarConfigWiringTest) proved thatblobStoreTypeconfiguration is turned into a
working client. The GCS and Azure contract tests hand-build their clients (new GcsBlobStore(storage, …),
`new AzureBlobStore(containerClient, …...
MockServer 7.5.0
[7.5.0] - 2026-07-29
Security
- BREAKING: response templates can no longer reach arbitrary Java classes by default, closing the
template remote-code-execution paths reported as
GHSA-7pwj-xvc2-hfpc (CVE-2026-123354, Velocity) and
GHSA-xcr9-3j63-6cgq (CVE-2026-123355, JavaScript).
A caller who can reach the management API can register an expectation, and a response template was able
to loadjava.lang.Runtimeand execute OS commands in the MockServer process. Both engines that could
do this are now sandboxed out of the box:velocityDisallowClassLoadingnow defaults totrue(wasfalse), installing Velocity's
SecureUberspectorso a template cannot reach classes through$request.class.classLoader.loadClass(...).
This is the more exposed half of the issue, and the half the report did not cover: Velocity ships in
the DEFAULT distribution, whereas the JavaScript engine does not.- JavaScript templates now resolve no Java classes unless an operator grants them. Previously an
emptyjavascriptAllowedClassesand emptyjavascriptDisallowedClassesmeant unrestricted
Java.type(...)access; that combination — the out-of-the-box state — now denies every class. - The GraalJS guest context no longer grants access to the members of
java.lang.Classor
java.lang.ClassLoader. Denying classes atJava.type(...)alone was not sufficient: real host
objects are bound into the context (fakerand the other built-in helpers), and under the previous
HostAccess.ALLa template could walk from one of them to a classloader —
faker.getClass().getClassLoader().loadClass('java.lang.Runtime')— reachingRuntimewithout the
class filter ever being consulted. That walk is now closed, so host-class lookup is the single complete
gate; a regression test drives four such walks (including throughrequest) and fails if any resolves.
Velocity'sSecureUberspectoralready blocked the equivalent walk through its own bound helpers, which
is now covered by a test too.
Both flips are fully reversible with one property and remove no functionality: set
mockserver.velocityDisallowClassLoading=false, or list the classes your templates need in
mockserver.javascriptAllowedClasses(the single entry*lets any class resolve again). Templates that
do not touch Java classes are unaffected, which is the overwhelming majority — JavaScript templates have
the full ES2023 standard library available regardless of this setting. A refused class is logged once at
WARN naming the class and the property to set, because GraalJS otherwise surfaces a refusal only as the
class being undefined ("... is not a function"); the log is bounded and de-duplicated so a hostile
template cannot flood it.mockserver.javascriptAllowedClassesis now also settable through the Spring
test listener's@MockServerTestproperties, which it was not before — it was a nice-to-have while the
default was unrestricted, and is the only way to grant a class now that it is not. The insecure-mode WARN
now fires when an operator has explicitly opened the
sandbox rather than when it is closed. Proven end-to-end by a Netty integration test that registers the
reported payload through the real management API and asserts the OS command creates no marker file, with
a negative control on a deliberately unsandboxed server that DOES create it — so a regression cannot pass
as an inert payload. This lands DEF-2 and DEF-3 ofdocs/plans/later/security-defaults.mdahead of the
other default flips listed there; JavaScript went further than that plan proposed (deny everything, not a
built-in "safe types" allow-list) because deny-by-default is the only form that stays safe as the JDK
grows new reachable classes.
Fixed
- A property file that cannot be read is now reported instead of ignored in silence
(#2358). When a
mockserver.propertyFilean operator had explicitly configured could not be read, MockServer applied
none of its properties and said nothing about it — at any log level. The only symptom was that every
property in the file appeared to be at its default, which surfaces far downstream as unexplained
behaviour: in the reported case an unreadable (but present) mounted file meantinitializationJsonPath
was never set, so no expectations loaded, noloading JSON initialization file:line appeared, and no
error was logged either. The message existed but was unreachable in practice — gated at DEBUG and
emitted during static initialisation, before any log level has been applied, so neither
-Dmockserver.logLevel=DEBUGnor a-logLevelargument could surface it. Such a file is now logged at
WARN, naming the path and the underlying reason verbatim; becauseFileNotFoundExceptioncovers "not
there" and "not allowed to read it" alike, that reason is usually the whole answer (Permission denied
in the reported case, typically SELinux labelling or a rootless/user-namespace UID mismatch). A property
file that is merely absent at its default location stays quiet, as does the Docker image's built-in
-Dmockserver.propertyFile=/config/mockserver.properties, which the entrypoint always passes and which
therefore expresses no intent — otherwise every container started without a mounted config would warn.
Inside the image, onlyMOCKSERVER_PROPERTY_FILEcan express that intent, and it does. - The
mockserver-nodelauncher suite no longer fails intermittently on a TLS handshake reset. The
two tests that exercisejvmOptionsdid so over HTTPS against a server started with
dynamicallyCreateCertificateAuthorityCertificate=true, and issued that HTTPS request as soon as
start_mockserverresolved.start_mockserveronly proves the HTTP control plane is answering — it
pollsPUT /mockserver/retrieveover plain HTTP — but with a dynamically created certificate
authority the server still has to generate a CA key pair and a leaf certificate before it can serve
TLS on that same (port-unified) port. A handshake arriving in that window was closed mid-negotiation
and surfaced asECONNRESET"Client network socket disconnected before secure TLS connection was
established", failing whichever of the two tests lost the race. This accounted for every
mockserver-nodefailure onmasterover the preceding 40 builds (5 of 40, ~12%), so it was the sole
cause of the pipeline's intermittent red. Both tests now wait for an actual TLS handshake to complete
before asserting, which gates them on the condition they really depend on rather than retrying the
assertions. The newwaitForTlsReadyhelper is verified to reject — not resolve — both when nothing
is listening and when a listener accepts the TCP connection then destroys it mid-handshake, which is
exactly the failure signature it exists to absorb. The readiness budget is deliberately generous
(120s): waiting costs nothing when the server is healthy, since a ready server completes the
handshake on the first attempt in milliseconds, so the limit only decides how much CI contention is
tolerated before a slow start is misreported as a fault. An earlier 30s budget went green five builds
running and then expired on a loaded agent — the same flake wearing a clearer error message. A start
that takes over 5s is now reported even when it passes, because readiness creeping towards the limit
is the signal that the next run will not make it. archiver.glob()works again in@mockserver/testcontainers(Node), and CVE-2026-14257 stays
closed. The previous remedy for thebrace-expansiondenial of service (GHSA-mh99-v99m-4gvg,
patched only in 5.0.8) was a blanket"brace-expansion": "^5.0.8"override. That resolved the whole
tree to a single hoisted 5.0.8 andnpm auditreported zero vulnerabilities — but 5.x changed the
CommonJS export from a callable function to an object ({ expand, EXPANSION_MAX, ... }), while the
minimatch copies actually installed (3.1.5, 5.1.9, 9.0.9) all call it asexpand(pattern). Every
glob containing a brace therefore threwTypeError: expand is not a function, crashing
archiver.glob(). The blast radius is narrower than it first looks —testcontainerscopies files
witharchiver.directory()/.append(), which pass no brace pattern and still work — so what broke
is brace globbing for anything in this module's runtime tree that does use it. The failure was
invisible because minimatch short-circuits patterns with no{, so plain globs kept working and the
unit suite stayed green. The override is now targeted:readdir-globandarchiver-utils'glob
takeminimatch@^10.2.5, which depends onbrace-expansion@^5.0.5and is written against the new
API, so both runtime copies land on the patched 5.0.8 with a matching minimatch. jest keeps its own
minimatch@3.1.5+brace-expansion@1.1.16pairing and is untouched.npm audit --omit=devstill
reports 0 vulnerabilities, and a newdependency-integrityunit test drives a brace pattern through
both runtime minimatch copies and through a realarchiver.glob()tar, plus asserts expansion stays
bounded — it fails against the blanket override, so the silent half of this cannot return.- A forward
responseOverridethat replaces the body no longer inherits the upstream response's
Content-Length, which truncated the response on the wire. The override swapped the body but left the
upstream header in place, so the client read only as many bytes as the body it replaced — a 34-byte
override behind an upstreamContent-Length: 13arrived as 13 bytes — or hung waiti...
MockServer 7.4.0
[7.4.0] - 2026-07-04
Added
-
Dashboard: every language tab now generates typed client code. The composer's Java, Node.js, Python, Go,
C#, Ruby, and Rust tabs construct each client's typed model — fluent builders and typed constructors matching
the website examples — instead of embedding raw JSON, including full LLM response actions in Java. Every
language's generated output is proven equivalent by executing or compiling it against the real client and
comparing the serialized expectation with the registered JSON, and a CI gate compiles the generated Java
against the built client on every build. -
Every client library now round-trips the full expectation model, proven by a shared fidelity harness. The
Go, Rust, C#, Python, Ruby, and Node clients gained typed support for every expectation feature they previously
dropped silently — chaos profiles, rate limits, forward-with-fallback and forward-validate actions, gRPC bidi
responses, before/after actions, steps, capture rules, namespaces, LLM response payloads including moderation,
rerank, and content filters, WebSocket frame matchers, response trailers, DNS matchers, and all body matcher
variants. Forty-four server-validated kitchen-sink fixtures now run as round-trip tests inside each client's own
test suite, with a ratcheting known-gaps ledger that fails CI if a documented gap silently regresses or a fixed
gap is still excused. -
Dashboard: JWT and all-of body matchers are now authorable in the composer. The Advanced request form gains a
JWT section (claims, issuer, audience, algorithm) and an all-of body matcher composing multiple sub-matchers,
emitted in the exact server wire format and round-tripping on edit. -
Dashboard: the Java code tab is now complete and type-safe. Generated Java uses the real client API for
priority, times, and time-to-live, scenario bindings, namespaces, and capture rules — proven by compiling a
kitchen-sink snippet against the built client — and the Java client gains matching withNamespace and withCapture
fluent methods. Actions the Java builder preview cannot represent show an honest notice instead of fabricated code. -
Dashboard: every captured flow is now a launchpad. A "Create From This" menu on traffic detail panes and
log rows fans out into every subsystem pre-filled from that flow — create a mock in the composer, set a
breakpoint, prefill a verification, or add chaos for the host. The traffic inspector also gains structured
Request/Response tabs (headers tables and pretty-printed bodies, with the raw JSON tree kept as a tab),
"Copy as curl" with shell-safe quoting and masked credentials, a Charles-style "Repeat" action (iterations,
bounded concurrency, delay, live progress and cancel), a Proxyman-style diff pool with an editable ignored-headers
list, an unmatched-count chip with why-didn't-this-match and generate-stub actions, and bulk
"Promote to Mocks" over recorded traffic (PUT /mockserver/recordings/promote). -
Dashboard: previously server-only capabilities are now reachable from the UI. Validate recorded traffic
against an OpenAPI spec (/trafficValidate), import GraphQL SDL schemas and mock SCIM providers, import Pact
contracts, generate HTTP expectations from AsyncAPI specs, dry-run WASM modules against a sample request,
reload persisted recording archives (NDJSON or from server disk), a preemption-simulation card and experiment
history in Service Chaos, a control-plane Audit view, a standalone Scenarios view in the navigation, and a
read-only Server Info tab (effective configuration with source tiers, bound ports plus bind-additional-port,
proxy setup with CA download) alongside a server-side decoded-prompt LLM run diff. -
Dashboard: quick chaos and honest latency attribution. A one-toggle Quick Chaos strip (percentage slider
over real per-request fault probabilities, per upstream host) makes fault injection approachable, and the
traffic timing waterfall now distinguishes latency MockServer injected (chaos latency, configured response
delays including the global delay, breakpoint holds) from real upstream/processing time — mock-served
responses carry a timing block for the first time when they inject latency (a plain mock's recorded
output is unchanged). -
Force a response-sequence variant per request. A request matching an expectation with multiple responses
can force which variant it receives via a 0-basedx-mockserver-response-indexheader. Forced requests
consumetimesbut never advance the sequential/switch rotation for other callers; the header is retained
in recordings and filtered from every outbound forward, including WebSocket passthrough. Invalid values are
ignored. -
Dashboard: faster first load, first-run onboarding, and one-click navigation. All views load lazily
(initial bundle down from 259 kB to about 164 kB gzip), a Try It Now path on the get-started view creates a
first mock, returning users get an open-dashboard shortcut, keyboard shortcuts move off
browser-conflicting bindings with a ? help overlay, and matcher testing is available at the point of need
in the composer and on every expectation row. The scenarios view details each scenario's states, bound
mocks, and transitions with edit-in-composer actions, and the advanced composer models scenario bindings
directly. The audit view explains the opt-in audit trail (and the demo enables it).
Fixed
-
Dashboard: editing an LLM or otherwise exotic expectation now generates complete typed client code in
every language. Fields the composer form cannot model — LLM responses with their full completion detail,
response sequences, object callbacks, forward-validate, gRPC bidi, rate limits, and cross-protocol
scenarios — were silently dropped from generated Python and Ruby code and embedded as raw JSON in C# and
Rust; all languages now construct the client's typed model, guarded by a universal test asserting no wire
field is ever absent from generated code. -
Registering forward-validate, forward-with-fallback, or gRPC bidi expectations no longer fails with a
metrics error. The per-action counter constants for these action types were missing, and a guard test
now asserts every action type has one. -
Generated Go code now compiles. All Go code generators — the dashboard expectation, verification, and
load-scenario tabs, the retrieve-as-Go endpoint, and the website examples — emitted the client import without its
/v7 semantic-import-versioning suffix, so generated code never resolved against the published module. -
.NET client: reading an object-callback expectation back from the server no longer throws. The
responseCallback field was typed as a string while the server emits a boolean, losing the whole expectation. -
Python client: multipart body field matchers no longer vanish on registration. Multipart fields were emitted
in an array form the server misroutes; they now use the server's canonical object form. -
Dashboard: editing a mock no longer shows phantom changes. An untouched edit round-trips to a zero diff — the
explicit default forms of priority, times, and timeToLive are preserved instead of appearing as removals, and a
genuine reset shows the explicit unlimited form. -
Dashboard: the Promote to Mocks button no longer wraps in a narrow traffic pane.
-
Dashboard: editing an expectation no longer silently strips fields the form does not model. The composer
now merges its form output onto the original expectation JSON, preserving scenario bindings, namespaces,
response sequences, cross-protocol scenarios, and matcher fields such askeepAliveandsocketAddressin
both quick and advanced modes, with an alert listing the preserved fields. -
Dashboard reliability fixes. Paused breakpoint exchanges survive navigating away from the Breakpoints
view; stream-frame editing is UTF-8 safe and surfaces encode failures; a reconnect re-sends the active
request filter instead of silently streaming unfiltered data; an error-only push no longer blanks the
panels; user-action errors persist until dismissed (and the banner is dismissible); mismatch dialogs report
honest "differs on N field(s)" scores with remediation hints; and a response template rendering invalid
output is now surfaced as aTEMPLATE_GENERATION_FAILEDevent instead of a silent 404 logged as a success. -
Dashboard performance, measured. Idle pushes no longer re-render every panel each second, hidden tabs
buffer instead of processing WebSocket updates, and hot parse/search paths are cached — all verified by a
committed benchmark suite (npm run benchinmockserver-ui) comparing against the pre-optimization
implementations at small and large payload scales. -
Automated release publishing for the Ruby and PHP Testcontainers modules. The
mockserver-testcontainers/ruby
andmockserver-testcontainers/phpmodules now publish automatically as two newsoft_failrelease-pipeline
components.tc-ruby(scripts/release/components/tc-ruby.sh) self-bumps the gemversion.rb, builds inside the
pinned Ruby image andgem pushestestcontainers-mockserverto RubyGems (credential from the existing
mockserver-build/rubygemssecret; skips gracefully if absent).tc-php(scripts/release/components/tc-php.sh)
subtree-splits the module and pushesmaster+ a version tag to themock-server/mockserver-testcontainers-php
Packagist mirror repo, mirroring the PHP-client publish; it skips gracefully until that mirror repo is provisioned
(one-time setup — seemockserver-testcontainers/php/PUBLISHING.md). Both support--dry-run, are release-type
gated (full/post-maven), and have soft post-release verification checks. See
docs/operations/release-process.md. -
**Go client:
jwt/allOfmatchers, a/v7module path, and a bundled Testcontai...
MockServer 7.3.0
[7.3.0] - 2026-07-01
Added
- Typed client methods for control-plane operations that previously needed a hand-written REST call. The
client libraries gain first-class methods for clock control (freeze / advance / reset / status), metrics
(the JSON counter snapshot and the Prometheus scrape), configuration read/update, Pact import / export / verify,
the file store (store / retrieve / list / delete), HAR and Postman import, the high-level operating mode
(SIMULATE/SPY/CAPTURE), and generating expectations from a WSDL — so these no longer require a manual
PUT /mockserver/…request. Rolling out across the Java, Node, Python, Ruby, Go, .NET, Rust and PHP clients.
Security
- Fixture redaction now also masks credentials in query strings and streamed bodies, and fails closed on
unparseable secrets. When redacting recorded traffic (HAR/Postman imports, the LLM optimisation report, the
MCP capture tools) the redactor previously only masked sensitive headers and named JSON body fields. It now also
(a) masks the values of credential-bearing query parameters by default (such askey,api_key,apikey,
access_token,token,signature,sig, and the AWS SigV4X-Amz-Signature/X-Amz-Security-Token) —
e.g. Gemini's?key=API key; (b) redacts configured fields inside each Server-Sent-Eventsdata:payload of
a streamed body, leaving non-JSON markers such as[DONE]intact (and failing closed on adata:payload it
cannot parse that still mentions a configured field); and (c) when a body is configured for field redaction but
cannot be parsed yet still mentions a configured field name, replaces the whole body rather than risk leaking it.
Ordinary unstructured bodies (plain text, HTML, decoded binary) that mention no configured field are left
unchanged. - A2A client builders: the custom-handler regex
messagePatternis now escaped completely. Every client
library (Java, Node, Python, Ruby, Go, Rust, PHP, .NET) inlinesmessagePatterninto a JSONPath=~ /…/regex
literal but previously escaped only the/delimiter, so a pattern ending in a lone backslash (or containing
\/) could escape the closing delimiter and break out of the regex literal into the surrounding JSONPath/JSON
(CodeQLrb/incomplete-sanitization). The escaping now preserves valid regex escape sequences (e.g.\d) while
neutralising the delimiter-breakout; normal patterns are unaffected. - Dashboard load-scenario report download now validates the URL scheme. The "download report" action passed a
URL assembled from the user-configured connection towindow.openwithout checking its scheme; it now opens the
report only when the URL resolves tohttp/https, ruling outjavascript:/data:redirection (CodeQL
js/client-side-unvalidated-url-redirection). /bindand/stopnow honour control-plane authentication/authorization. These mutating lifecycle
endpoints were serviced before the auth gate; they now require the same control-plane auth as
/mockserver/configuration. Default deployments with no control-plane auth configured are unaffected, and
/status//readyremain open for health probes. Closes the lifecycle-endpoint gap noted in 7.2.0.- MCP tool calls now honour control-plane authorization. With
controlPlaneAuthorizationEnabled, each MCP
tool is classified read vs mutate (fail-closed) and checked against the same role model as the HTTP control
plane, so a read-only principal can no longer invoke mutating MCP tools (create/clear/reset/…). Default
(authorization disabled) behaviour is unchanged; enforced across HTTP and HTTP/3, single and batch. Closes
the per-tool MCP gap noted in 7.2.0. - Control-plane JWT validation cross-request race fixed. A single shared
JWTValidatorreconfigured the
Nimbus processor (key selector + claims verifier) on every call, so concurrent control-plane requests could be
verified against another request's policy. The processor is now configured once andvalidate()is stateless. - Remote JWKS / OIDC discovery fetches are now bounded. JWKS-key-set and OIDC discovery-document fetches on
the authentication path used the JOSE library defaults (infinite connect/read timeout, no size limit); they now
use finite timeouts and a size cap, so a slow or hostile identity-provider endpoint can no longer hang the auth
path or be used as an amplification vector. - Velocity templates can no longer fetch arbitrary URLs or read local files. The Apache Velocity
ImportTool(which exposes$import.read(url|file)) was registered in the template toolbox; it has been
removed, closing an SSRF / local-file-disclosure vector in response templates. - mTLS control-plane authentication rejects expired client certificates. Client-certificate authentication
validated only that the certificate chained to the configured CA; it now also enforces the certificate
validity window, so an expired or not-yet-valid (but correctly signed) client certificate is rejected. - Mock OIDC client-secret comparison is now constant-time.
Added
Load injection, chaos & SRE
- Chaos experiments can assert an SLO and emit a verdict. A chaos experiment may now carry an optional
sloCriteria; on termination MockServer attaches a terminalexperimentVerdict(PASS/FAIL/
INCONCLUSIVE) evaluated strictly over the experiment's window —PASSonly if every objective held
throughout,FAILon any breach or auto-halt,INCONCLUSIVEbelow the minimum sample count. Turns
"inject faults" into "verify resilience held." - SLO-breach auto-halt for chaos experiments. An experiment carrying
sloCriteriais halted immediately
(statushalted_by_slo_breach, verdictFAIL) when an SLO objective is breached mid-run. No behaviour
change whensloCriteriais absent. The dashboard's chaos panel now shows the terminalexperimentVerdict
(PASS / FAIL / INCONCLUSIVE) with per-objective observed-vs-threshold detail.
Request matching & response generation
- JavaScript response templates now have a configurable execution timeout. A runaway or malicious
JavaScript template (for example one containing an infinite loop) could previously pin the data-plane
worker thread handling that request indefinitely. A newjavascriptTemplateExecutionTimeoutproperty
(milliseconds) caps how long a template may run; on expiry a watchdog cancels the evaluation and the
request fails fast with a clear, logged timeout error. The default is5000(5 seconds), far longer
than any legitimate template needs. Set it to0(or a negative value) to disable the timeout and
restore the previous unbounded behaviour. NOTE: this introduces a bounded behaviour change — templates
that genuinely run longer than 5 seconds (previously allowed) will now be cancelled unless the timeout
is raised or disabled. - Mustache response templates can now read scenario state by name. Velocity
($scenario.get('orderId')) and JavaScript (scenario.get('orderId')) could already read
scenario/captured state in a response template; the Mustache engine now exposes the same through a
section lambda —{{#scenario.get}}orderId{{/scenario.get}}, where the state name is the section
body (jmustache cannot pass a method argument inline the way Velocity and JavaScript can). This
completescapture→ template value reuse across all three template engines, so an id captured
from one request can be returned in the response body of a later request regardless of template
engine. Documented on the Stateful Scenarios page with a per-engine example. - Closest-match hint on unmatched requests (
closestMatchHintEnabled, default on). When a request
matches no expectation, the404response now carries a compact, length-bounded
x-mockserver-closest-match-hintheader naming the closest expectation and the first field that differed —
answering "why didn't my mock match?" without enabling verbose diagnostics. SetclosestMatchHintEnabled=false
to suppress. (The opt-inattachMismatchDiagnosticToResponse, which adds a full JSON diagnostic body, is
unchanged and still off by default.)
OpenAPI & contract testing
- Validate recorded traffic against an OpenAPI spec (
PUT /mockserver/trafficValidate). A new
control-plane endpoint validates the request/response traffic MockServer has already recorded against a
provided OpenAPI spec (URL, file path, or inline), returning a structured pass/fail report
(totalRequests/passed/failed/allPassedplus per-requestmatchedOperation,requestErrors,
andresponseErrors) — mirroring the/contractTestreport. The endpoint is gated by the same
control-plane authentication as its siblings, and a spec URL is fetched only after passing the same SSRF
policy enforced on proxy/forward paths. - Java client helpers for contract testing & Pact. The Java
MockServerClientnow exposes fluent, typed
methods for the contract-testing endpoints:contractTest(spec, baseUrl[, operationId]),
trafficValidate(spec),pactImport(json),pactExport(consumer, provider), andpactVerify(json). The
contract-test and traffic-validation reports parse into typedContractReport/ContractResultobjects so
callers no longer hand-roll raw HTTP. - Per-import realistic example generation. OpenAPI imports can now request realistic (Datafaker) example
values for a single import via a"realisticValues": trueentry in the reserved__generationOptions__
map (alongside the existingseedandfieldOverridesoptions), without changing the global
generateRealisticExampleValuesconfiguration. When the entry is absent, behaviour is unchanged and the
global default still applies.
Dashboard UI
- New "MCP Health" dashboard panel. When a coding-assistant CLI is proxied through MockServer, its MCP
ser...