Skip to content

v0.17.2: security release (request path handling)

Choose a tag to compare

@tech4242 tech4242 released this 15 Nov 21:23
· 247 commits to main since this release
901b268

Security release

Update now. All earlier versions of aquaman-proxy are affected, and with it aquaman-plugin and aquaman-coder. Advisory: GHSA-9qh6-wffq-9m9v.

npm install -g aquaman-proxy aquaman-coder
openclaw plugins install clawhub:aquaman-plugin   # OpenClaw users

Then restart the daemon or the OpenClaw gateway.

A crafted request path could send a stored credential to another host

The proxy read a client's request path one way for its policy check and another way when it built the upstream URL. A path of the form /<service>/\<host>/<path> resolved to a different host, and the request went there with the real credential injected. Any process able to reach the proxy could do this: any process running as you, or any local process holding the loopback token when the loopback listener is on. That includes the agent the proxy is meant to keep credentials away from, if it can run commands.

The same mismatch let requests past request-policy deny rules: . and .. segments (plain or percent-encoded), a query string directly after a denied path, percent-encoded letters, ;parameters, and X-HTTP-Method-Override for method rules.

What changed

  • The request path is parsed once, strictly, and that one reading is used for the service name, the policy check and the upstream path. Paths that two parsers could read differently are refused with HTTP 400: backslashes, dot segments in any encoding, encoded backslashes and control characters, double-encoded separators, malformed escapes, fragments.
  • The upstream host and scheme come from the service definition only.
  • A request must be allowed by policy under every way an upstream could read its path or its method.
  • The proxy does not follow upstream redirects (unchanged, now covered by a test).

Should you rotate credentials?

The audit log records the service and outcome of each proxied request, not its path, so it cannot tell you whether this was used. If untrusted code, or an agent working on untrusted content, could reach the proxy, rotate the credentials stored in aquaman.

Also fixed: redaction across output chunks

aquaman-coder exec redacted command output one chunk at a time, so an injected value that arrived split across two chunks was written unredacted. Output is now redacted as a stream. As before, redaction guards against accidental exposure; a command that deliberately transforms a value it was given (base64, reversing) is not stopped by it.

Behaviour changes to expect

  • Requests with ambiguous paths get HTTP 400 where they were previously forwarded or answered 404.
  • A policy rule on an exact path now also matches requests that carry a query string. If you have an allow-list policy, requests that were wrongly denied because of a query string are now allowed; deny rules that were being skipped now apply.
  • Output from aquaman-coder exec can arrive slightly later: the last unfinished line is held until it completes or the command exits.

Breaking changes

None beyond the behaviour changes above.