FastX in a Box: Using Docker to Find Where a Pre-Auth RCE Lived (and How It Died)

Table of contents
This one started with a FastX 3.0.47 server on an engagement and a web terminal emulation that would run commands for anybody who asked. FastX is StarNet's remote desktop server, the kind of thing HPC shops and university labs stand up so people can get a Linux desktop through a browser. 3.0.47 is FastX 3.0 Build 47, released April 27, 2020.
Writing that up for the vendor should have been simple. Then I built a lab on current builds and couldn't reproduce it on either one.
This post is about how I settled that argument: tracking down builds that StarNet no longer serves, reading them without installing them, and then standing each one up in a throwaway CentOS 7 container until the version range stopped being a guess. In short, the RCE is real on every build from 3.0.41 through 3.1.27 but stopped working in 3.2.27 by accident, when the terminal feature broke; a CVE request for it is pending.
My First Attempt at a Lab
The first lab was two Ubuntu 22.04 VMs on an isolated libvirt network with an nftables egress guard, running the two current builds, 3.2.60 and 3.3.71. A Docker container on the host ran the replay harness. Neither build was exploitable.
The reasons were good ones, too. Neither package ships node_modules/gritty (the web terminal library) or node-pty, so nothing could spawn a terminal even in theory. The terminal code had also moved into user-link, a per-session Node process bound to loopback, and the code that starts it was broken:
function start(app) {
let io = socketIo(app.server); // terminal/index.js:21
io.on('connection', socket => { ... });
}terminal.start() is handed the Express app and reads .server off it. Nothing in user-link ever assigns app.server, so socketIo(undefined) builds a Socket.IO server attached to nothing. It never mounts /socket.io/ and never registers an upgrade listener.
That last part is visible from the outside, over one TLS connection, varying only the headers:
plain GET, polling -> HTTP/1.1 404 Not Found [text/html]
plain GET, transport=websocket -> HTTP/1.1 404 Not Found [text/html]
UPGRADE, socket.io path -> CLOSED, no bytes
UPGRADE, / (root) -> CLOSED, no bytes
UPGRADE, bogus path -> CLOSED, no bytes
plain GET, bogus path -> HTTP/1.1 404 Not Found [text/html]A Node HTTP server with nothing handling an upgrade just destroys the socket without sending a response. Closed with zero bytes on every path while plain GETs answer normally is a reliable fingerprint for "no WebSocket handler is attached here," and it looks nothing like a firewall drop or a proxy rejection.

So I wrote it down the way the evidence read at the time: a latent integration flaw, not a demonstrated pre-auth RCE in a released build. I had seen it work against one build and had a lab telling me the finding was a paper tiger. The lab was right about the builds in it. I just didn’t have the right builds.
Finding a Build Nobody Sells Anymore
Getting 3.0.47 was the hard part of the whole project.
Current builds are easy to get; old ones aren't, and StarNet's 3.1 install guide explains why: FastX 3.0 and 3.1 shipped as individually downloaded RPMs (Debian folks were told to run alien on them), and repository distribution only started around 3.2.5x. The vendor doesn't serve anything that old anymore, and the registration-gated trial page only offers current releases.
FastX also isn't in any Linux distribution. If it were in Debian, snapshot.debian.org would have every version ever published and none of this would have been a problem.
I'm not going to say where the old builds came from. What matters for the method is what I ended up holding at the old end of the range:
3.0.32
3.0.41 3.0.42 3.0.43 3.0.47
3.1.22 3.1.25 3.1.27
3.2.27 3.2.36That list includes 3.0.47, the build from the engagement, plus the transition range the lab couldn't see.
Reading Packages Without Installing Them
Not every question needs a running server. Most of the version matrix came from cracking packages open and counting files.
An RPM is a cpio archive with a header, and 7z will unwrap both layers without needing rpm2cpio on the box:
7z x -y fx.rpm
7z l *.cpio | grep -iE 'user-link|error/index\.js|node_modules/gritty/|node_modules/node-pty/'I wrapped that in a loop over every package I had: extract, count node_modules/gritty/, and node_modules/node-pty/ entries, find which file the terminal lives in, grab the line that attaches Socket.IO, check the error-asset route for an allowlist, and deleted the package. 3.2.34 is the one build in that stretch I never got, and it's the gap between 3.2.27 and 3.2.36.
The same check works on a container image without ever running it. docker create instantiates a container without starting it, and docker export dumps its filesystem as a tarball:
C=$(docker create "$IMAGE")
docker export "$C" > fx.tar
docker rm "$C"
tar tf fx.tar | grep -iE 'user-link|gritty' | grep -vE 'node_modules/.*/node_modules'
tar tf fx.tar | grep -c 'node_modules/gritty/'For 3.2.27, that last count came back zero, which put a hard ceiling on the RCE range: by 3.2.27 the library was already gone. A container image is a perfectly good package format for static analysis, and you never have to give the vendor's entrypoint a chance to run.
A CentOS 7 Container per Build
Static analysis can rule things out, but confirming what the code does meant getting the builds running, and these are RHEL 7 RPMs from 2020. A CentOS 7 container per build fit that well: each one is disposable, they all sit on the same box at once, and when a build misbehaves, you docker rm -f it and start over.
The per-build setup, lifted from the script I used:
docker rm -f "$NAME" >/dev/null 2>&1
docker run -d --name "$NAME" centos:7 sleep infinity
docker cp p.rpm "$NAME":/tmp/p.rpm
docker exec "$NAME" rpm -ivh --nodeps /tmp/p.rpm
docker exec "$NAME" bash -c '/usr/lib/fastx/3/install.sh'
docker exec -d "$NAME" bash -c 'cd /usr/lib/fastx/3 && ./nodejs/bin/node www/server/bin/fastx_server.js > /tmp/fx.log 2>&1'
sleep 14
docker exec "$NAME" bash -c 'grep -E "FastX Version|Listening on port" /tmp/fx.log'
IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' "$NAME")sleep infinity keeps the container alive so systemd never enters the picture. FastX gets launched by hand with its bundled Node, straight at fastx_server.js, and the tools get pointed at https://$IP:3300. --nodeps, which skips the dependencies the RPM declares; the web server came up and served HTTP without them.
Six builds went through this: 3.0.32, 3.0.47, 3.1.27, 3.2.36, 3.2.60, and 3.3.71. The first question for each was cheap and safe. The tool's --dry-run completes the Engine.IO handshake, joins the /gritty namespace, and stops when the server emits accept. Nothing runs on the target. I ran a command exactly once, on 3.1.27, to prove the result was code execution:
[0.03s] connect /gritty -> 200 'ok'
[0.04s] sent terminal -> 200 'ok'
[0.04s] exit code [0]
--- command output ---
uid=999(fastx) gid=0(root) groups=0(root)No session, no credential, no login page. The gid=0(root) is a container artifact, though. More on that below.
Things the Container Was Wrong About
A containerized install differs from a real one in ways that matter. Three of these bit me, and two of them would have made it into the advisory if I hadn't caught them.
A server that never started looks exactly like a patched one. 3.0.32 and 3.2.36 both came back "no read" on the first pass. Both web servers had aborted on startup because /usr/lib/fastx/var/license didn't exist, which a real install would have created. Once the directory existed, both were vulnerable:
docker exec "$N" bash -c 'mkdir -p /usr/lib/fastx/var/license /usr/lib/fastx/var/log; chown -R fastx /usr/lib/fastx/var'This compounds badly with how StarNet fixed the file read in 3.3.71. Their allowlist rejects a bad filename with res.send(''), an empty 200, which is byte-identical to the handler's "file not found" response. So "patched," "route missing," and "server dead" all look the same from the outside. Confirm the Listening on port 3300 line in the log before recording any negative.

The launchers fail when run detached. The database launcher prompts for an administrative account on standard input and exits immediately when there's no terminal to prompt on, which is why my earliest attempts died on startup. The web launcher also starts its own database, so running both collides on the Erlang node name. Run only the web launcher.
gid=0(root) was me. That output above reads like the FastX service account is in the root group, and my notes said exactly that for a while. It isn't. FastX has setuids at 999 when it starts but never calls setgid, so it inherited group 0 from the root shell docker exec handed it. The packaged account is fastx:x:999:998, and the shipped systemd unit sets User=fastx with no Group=, so on a real install the same command returns gid=998(fastx). That's still code execution as the account that owns FastX's JWT signing key and config, but it isn't root-adjacent, and I wasn't going to put root-adjacent in an advisory on the strength of my own launch shell.

What the Matrix Says
23 builds inspected, 3.0.32 through 3.3.71 plus 5.1.7, six of them driven live. Collapsed down to what matters:
Builds | Where the terminal lives | How Socket.IO attaches | Terminal RCE |
3.0.32 | nowhere, no terminal shipped | n/a | no |
3.0.41-3.1.27 |
|
| yes, pre-auth |
3.2.27-3.3.71 |
|
| no |
5.1.7 | subsystem removed | n/a | no |
In the vulnerable range, the terminal is mounted on the public web server's own HTTP listener, and gritty is wired up with no auth option:
function start(app) {
const socket = io.listen(app.server); // the web server's own http server
gritty.listen(socket, {
command: 'sh ' + path.resolve(__dirname, 'dologin.sh'),
autoRestart: true,
});
}Two upstream behaviors in gritty turn that into RCE—a missing auth callback means "admit everyone," and the client's requested command outranks the one the server configured:
if (!auth)
return connection(options, socket); // -> socket.emit('accept')
...
const command = overrides.command || options.command || getCMD({platform});So the dologin.sh that FastX carefully configured never runs. Whatever the client sends in its terminal event does. The terminal page is admin-gated. The Socket.IO namespace behind it isn't gated at all, because Express middleware never runs on a Socket.IO handshake; Socket.IO attaches to the HTTP server underneath Express. That gap between gating a page and gating the transport behind it shows up in plenty of apps besides FastX. Plenty of apps "protect" a socket with middleware that never executes.

The RCE opens between 3.0.32, which has no terminal at all, and 3.0.41. It closes between 3.1.27 and 3.2.27, and nothing in between was obtainable, so 3.1.28 through 3.2.26 are reported as unknown. Across that gap three things changed at once: gritty stopped being packaged, node-pty went with it, and the terminal moved into user-link where app.server is never set. Any one of those alone would have killed it. None of them is an auth check.

This is the part that worries me most. The fix that looks like a one-line typo correction, handing socketIo() the real server, is the fix that brings the vulnerability back. A maintainer repairing a dead terminal feature would have no reason to suspect that from the diff. On the current architecture it would come back as a cross-user compromise on a shared host (any local account reaching another user's loopback user-link port) rather than a remote one, but it would come back.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, scored 9.8 (Critical).
Bugs the Mocks Missed
Running the tooling against a live 3.0.47 instead of the mock servers in its test suite found two bugs in my own interactive mode, and neither could have shown up against the mocks, because the mocks answered the keepalive themselves.
Interactive sessions died after about thirty seconds. Engine.IO v3 puts the ping on the client: the server advertises pingInterval, then reaps any session that hasn't pinged within pingInterval plus pingTimeout. My transport only ever answered pings, which is the v4 shape, so a session that ran a 20-second command finished it and then died with Session ID unknown. Ctrl-C was the other one. Raising KeyboardInterrupt inside the long poll aborted that HTTP request, the server read the dropped connection as a disconnect, and the session was gone before the ^C could even be sent. Both are fixed, and the mock now reaps unpinged sessions so the tests pin it.

The same run proved the token forgery end to end: read the signing key through the file read, mint a token with the standard-library RS256 signer, and watch the live server accept it. No token gets Token not found, and the same token with one signature byte flipped gets Token has been revoked. On 3.2.60 the forged token is refused, because that build looks up the jti in its token store before it checks the signature. Binding tokens to a session record is a mitigation the newer builds already have and 3.0.47 doesn't.
The file read and the forgery aren't mine, for the record. They're CVE-2025-57618, public since October 2025 with a public exploit. The work here confirmed the range (NVD says "thru 3.3.67," but 3.3.69 is affected too, and 3.3.71 is the fix) and that the working request is the absolute form, /error/assets/%2fetc%2fpasswd, which has no dot segments at all. path.resolve discards every earlier segment when a later one is absolute. That makes it CWE-36, not the CWE-24 on the record, and a filter looking for ../ stops nothing.
What Can Be Done?
Get off 3.0.41-3.1.27. Anything 3.2.27 or later doesn't carry the terminal RCE. Go to 3.3.71 specifically, since everything before it still has the unauthenticated file read. FastX 5.1.x is also unaffected, but moving there is a full migration: new config format, Node.js 22, and no RHEL 8 support.
Don't block WebSocket upgrades. I have to own this one. The workaround in my CVE request as I first submitted it said to block WebSocket upgrade requests at a reverse proxy. That advice was wrong twice over. The exploit runs over Engine.IO HTTP long polling and never attempts an upgrade, and the FastX web port legitimately serves upgrades for /client/protocol and /client/bridge, which is how the client talks to the server. Anyone who followed it would have taken an outage and stayed exposed. I've corrected the request since. The guidance now is to restrict access to the web port and filter the /socket.io/ path.

Detect on HTTP, not WebSockets. The FastX web port runs a strict upgrade allowlist and destroys any other upgrade, so /socket.io/ can't upgrade there and terminal traffic falls back to long polling. The signature is GET /socket.io/?EIO=3&transport=polling followed by a 40/gritty, namespace connect. No legitimate traffic on a shipped build looks like that.
Check your scope list from the build string first. The tooling from this post is at github.com/bandrel/fastx32shell. GET /v3/api/ returns the build as result.build, and that's all fastx32shell scan sends:
fastx32shell scan --base-file scope.txt
fastx32shell rce --base https://fastx.example.com:3300 --dry-runEvery verdict carries its basis (confirmed, inferred, or unknown), and a build in the 3.1.28-3.2.26 gap comes back as unknown. --dry-run is the confirmation step: it stops at accept and runs nothing. There are nuclei templates for the read, the /gritty namespace, and the version string if you'd rather sweep that way.
If you ship gritty yourself, pass an auth callback that actually validates something, and stop honoring a client-supplied command, cwd, or env. The second one survives a correct integration, so that's the one worth raising upstream.
The Short Version
- Vendor repos prune, and a proprietary package with no distro presence has nobody else keeping copies. Finding old builds is the expensive part of a version sweep, so plan for it.
docker createplusdocker exportturns any image into a tarball you can grep, without ever running the vendor's code.- One CentOS 7 container per build makes a version sweep cheap enough to do.
- In a container, confirm the server is listening before you trust a negative, and check your group ID before you claim root.
- Treat an empty
200as inconclusive, and don't count a broken feature as a fix.
In FastX 3.3, the only thing keeping the terminal unreachable is that socketIo(app.server) is broken. Fixing that line would bring the bug back.