GHSA-v52w-28xh-v562: Kozou: Unauthenticated MCP HTTP server and bundled dev-stack hardening (DNS-rebinding, request-body limits, read-only reads, default network exposure)
Kozou, a tool that turns a PostgreSQL schema into an Admin UI, REST API and MCP server, shipped four hardening gaps in versions up to 1.8.0. The unauthenticated MCP HTTP server had no DNS-rebinding protection, both servers buffered unlimited request bodies, GET requests ran read/write, and the dev compose stack published services on all interfaces. Version 1.8.1 fixes all four.
Published Jun 19, 2026 · Analysis Oct 25, 2026
What an attacker can do
Kozou's MCP server uses the Streamable HTTP transport with no authentication, bound to loopback. Without Host and Origin validation, a malicious web page open in the operator's browser can rebind a domain it controls to 127.0.0.1 and then drive the MCP endpoint. It can read schema metadata. If the opt-in call execution tool is enabled, it can run the exposed database functions as the execution role.
Three further gaps compound this:
- Both the MCP HTTP server and the in-house REST server read the whole request body into memory with no cap. A reachable client can push the process toward memory exhaustion.
- The role-transaction envelope opened every request with a plain
BEGIN, so aGETran read/write. ASELECTthat reaches a volatile function, or a writable orINSTEAD-triggered view, could write and commit. - The scaffolded
docker-compose.ymland the quickstart published the no-auth Admin UI, the MCP server and the default-credential demo database on every host interface, and the config defaulted to0.0.0.0.
PostgreSQL still enforces grants and row-level security, because requests run under SET LOCAL ROLE. The advisory calls these defense-in-depth and read-contract hardening. Exposure is greatest with call enabled or a server reachable beyond loopback. GitHub's page rates it Moderate while the data panel here shows High (CVSS 4.0 8.4).
Who is affected
The npm packages kozou, @kozou/api, @kozou/mcp and @kozou/core at 1.8.0 or earlier, plus the lockstep sibling packages. The container image ghcr.io/kozou-dev/kozou is affected for tags before v1.8.1. Anyone who ran the scaffolded docker compose up on a host reachable from an untrusted network was exposed. Check:
npm ls kozou @kozou/api @kozou/mcp @kozou/coreFor containers, check the image tag in your compose file.
kozou
- Ecosystem
- npm
- Affected
- <= 1.8.0
- Fixed in
- 1.8.1
- Check
npm ls kozou
@kozou/api
- Ecosystem
- npm
- Affected
- <= 1.8.0
- Fixed in
- 1.8.1
- Check
npm ls @kozou/api
@kozou/mcp
- Ecosystem
- npm
- Affected
- <= 1.8.0
- Fixed in
- 1.8.1
- Check
npm ls @kozou/mcp
@kozou/core
- Ecosystem
- npm
- Affected
- <= 1.8.0
- Fixed in
- 1.8.1
- Check
npm ls @kozou/core
How to fix it
Upgrade every Kozou package to 1.8.1, or pull the image at tag v1.8.1.
npm install [email protected] @kozou/[email protected] @kozou/[email protected] @kozou/[email protected]1.8.1 validates Host and any Origin against an allowlist (loopback always allowed, more hosts by configuration), rejects over-large bodies with 413 and non-JSON bodies with 415, runs GET in a READ ONLY transaction, and binds loopback by default. The DNS-rebinding guard is a browser defense. You must still limit network reach of the unauthenticated server.
Workarounds if you cannot upgrade:
- Bind the Admin UI and MCP server to loopback and publish host ports on
127.0.0.1only. - Keep the MCP
calltool off on any non-loopback or unauthenticated deployment. - Put an authenticating reverse proxy with
Host/Originchecks and a body limit in front. - Change the demo database's default credentials and restrict its port.
How to tell if you were hit
Check which interfaces the services listen on: Admin UI, MCP HTTP and the demo database published on 0.0.0.0 instead of 127.0.0.1 show the compose exposure. Look in the MCP server and PostgreSQL logs for requests with a Host header that is not a loopback name, or call invocations you did not make. Check for unexpected writes made by the serving role during GET requests. Memory spikes or out-of-memory kills in the Kozou process may indicate oversized bodies. Beam records the MCP tool calls an agent makes, so agent-driven call use against Kozou can be reviewed there.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Kozou compiles a PostgreSQL schema into an Admin UI, a REST API, and an MCP server. Several hardening gaps in the bundled HTTP surfaces and the scaffolded dev stack are fixed in 1.8.1.
Issues
- MCP HTTP server lacked DNS-rebinding protection. The Streamable HTTP transport is unauthenticated and loopback by default. Without
Host/Originvalidation, a malicious web page in the operator's browser could rebind a hostname it controls to the loopback address and drive the MCP endpoint — reading schema metadata, or (when the opt-incallexecution tool is enabled) executing exposed functions as the execution role.
- Unbounded request-body buffering (DoS). Both the MCP HTTP server and the in-house REST server read the entire request body into memory with no size limit, so a reachable client could drive the process toward memory exhaustion.
- Read requests ran in a read/write transaction. The shared role-transaction envelope opened every request with a plain
BEGIN, so aGETran read/write. ASELECTthat reaches a volatile function or a writable /INSTEAD-triggered view could perform a write that then commits — the "a GET only reads" contract was left to the serving role's grants rather than enforced.
- No-auth dev surfaces published on all interfaces by default. The scaffolded
docker-compose.yml(and the quickstart) published the unauthenticated Admin UI and MCP HTTP server — and the default-credential demo database — on every host interface, and the config defaulted those binds to0.0.0.0.
What changed in 1.8.1
- DNS-rebinding guard (MCP HTTP): the server validates the
Hostheader (and a presentOrigin) against an allowlist before handling any request, on every route. Matching is on the hostname; loopback names are always accepted and an operator can add hosts via configuration. A browser cannot forgeHost/Origin, so this closes the rebinding vector. (This is a browser-rebinding defence; network reachability of an unauthenticated server must still be constrained by the network — see workarounds.) - Request-body size cap: both HTTP servers reject an over-large declared
Content-Length(413) and enforce the limit while streaming, so a chunked /Content-Length-less body cannot grow unbounded. A non-JSONContent-Typeon a body is rejected with 415. The cap is configurable. - Read-only read transactions: read methods (
GET) now run in aREAD ONLYtransaction, so the database refuses any write for the duration of the request regardless of the role's grants. - Loopback-by-default network posture: the Admin UI and MCP HTTP server now bind loopback by default; the bundled compose files publish every host port (Admin UI, MCP, database) on
127.0.0.1only, while the container binds all interfaces internally so the loopback mapping still works. Operators opt into a broader bind explicitly.
Impact
The MCP HTTP server's exposure is greatest when the opt-in call execution tool is enabled and/or the server is reachable beyond loopback. The read/write-transaction issue has effect only when the schema exposes a read path that can write (a volatile-function-backed column or a writable/INSTEAD-triggered view) and the serving role holds write grants. The all-interface publish affected anyone who ran the scaffolded docker compose up on a host reachable from an untrusted network. Requests run under SET LOCAL ROLE, so PostgreSQL still enforces grants/RLS at runtime; these are defense-in-depth and read-contract hardening.
Affected / patched
- npm packages
kozou,@kozou/api,@kozou/mcp,@kozou/core(and the lockstep-versioned siblings): affected<= 1.8.0, patched 1.8.1. - Container image
ghcr.io/kozou-dev/kozou: patched at tagv1.8.1.
Workarounds (if you cannot upgrade immediately)
- Bind the Admin UI and MCP HTTP server to loopback and publish their host ports on
127.0.0.1only; do not expose them to untrusted networks. - Do not enable the MCP
callexecution tool on a non-loopback / unauthenticated deployment. - Put an authenticating reverse proxy (with
Host/Originvalidation and a request-body limit) in front of any non-loopback deployment. - Change the demo database's default credentials and restrict its port.
Patches
Upgrade to Kozou 1.8.1 (all npm packages and the ghcr.io/kozou-dev/kozou image).
Questions
- Does the DNS-rebinding issue need the `call` tool enabled?
No. Without
call, a rebinding page can still read schema metadata. With the opt-incalltool on, it can also run exposed functions as the execution role.- Which Kozou version fixes it?
1.8.1 for all npm packages, and tag
v1.8.1for theghcr.io/kozou-dev/kozouimage. Versions up to 1.8.0 are affected.- Does upgrading make the MCP server safe to expose on a network?
No. The server stays unauthenticated. The Host and Origin guard only stops browser rebinding. Keep it on loopback or behind an authenticating reverse proxy.
- Is there a CVE or evidence of exploitation?
The data for this entry lists no CVE, and no source reports exploitation. It is not in CISA's KEV catalog.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More Other MCP servers and tools vulnerabilities
All Other MCP servers and tools entriesCVE-2026-77361
obsidian-tc : Symlink read-ACL scope bypass via lexical path checks
medium4.7Oct 23, 2026CVE-2026-114126
Storybook dev server vulnerable to code injection from the local network
high8.7Oct 22, 2026CVE-2026-113731
djust: Arbitrary absolute-path file read in the find_handlers_for_template MCP tool
low3.3Oct 21, 2026CVE-2026-114125
Storybook: Missing origin validation in Storybook preview allows code injection from malicious websites
critical9.4Oct 21, 2026CVE-2026-111770
MCP TypeScript server SDK: Shared transport or server instances delivered one HTTP client's messages to another
high7.7Oct 20, 2026GHSA-953h-535j-jg2v
agent-router: MCP session resume does not verify the embedded anti-hijacking subject; default Helm seed makes session IDs forgeable
medium6.8Oct 19, 2026
