PyTraix Caesar-shifted hints lead to a YAML RCE

web
flag RxR{d430d840-a968-42fa-9973-6f99e56ae2dc}

The brief promises intercepted traffic, a compromised config pipeline, a privilege escalation and a flag under root. What you actually get is one hostname behind Cloudflare serving a Vite SPA, and a surprising amount of the "challenge" is the author handing you the solution if you read far enough.

Recon: the SPA is a wall, robots.txt is the door

Every guessed path (/login, /dashboard, /admin/logs, /system/config, /.git/config) returns the same 1606-byte HTML shell - the classic SPA tell, since routing happens in JS and path fuzzing is useless against it. robots.txt is served by the real backend though, and it names five paths it would rather you ignore:

output
Disallow: /admin/
Disallow: /config
Disallow: /api/internal/
Disallow: /.git/
Disallow: /backup/

Only /config is real; the rest are decoys or plain 404s.

Insight

Reading the shipped JS bundle paid off immediately - it carries its own walkthrough. A "ShadowByte Collective" overlay warns that config endpoints "processing structured YAML formats" are exposed, a status ribbon says PARSER SUBSYSTEM: PyYAML / UNSAFE and RUNTIME PRIVILEGES: SUID BINARIES DETECTED, and a footer spells the objective out: YAML RCE on /config, escalate, read /root/flag.txt.

Decrypting the "intercepted traffic"

The bundle ships a table of three Caesar-shifted payloads, one against a path called /jvumpn. Rather than trust the footer's Roman-numeral hint, I brute forced all 26 shifts. Shift 7 is the only one that reads as English:

output
/jvumpn  ->  /config
"Johkhizpvu lhkwvpua pz h khjrtlu mvby jvumpn chyz"
         -> "Chadabsion eadpoint is a dackmen four config vars"

Pitfall

The misspellings ("Chadabsion", "Iaml", "emecution") are not a leftover cipher pass - they're in the author's own plaintext. /hints returns the identical typos next to a decoded field, and the Flask source has them verbatim in ENCRYPTED_HINTS. Don't go hunting for a second transform to "fix" a decode that already matches the source.

/hints does the rest of the job for you: four attacker messages ending in "Use python3 for root escalation" and "The flag is in the static folder."

The vulnerability: an UnsafeLoader behind a 415

/config is POST-only; a JSON body gets a 415 that names the parser:

output
x-parser: PyYAML/5.4.1
x-config-format: YAML

A plain YAML document echoes back "loader": "UnsafeLoader". That's the whole bug - the source, pulled later, confirms it in one line:

python
1config = yaml.load(data, Loader=yaml.UnsafeLoader)

!!python/object/apply: tags instantiate anything you name.

Blind RCE, with two exits

The endpoint only reflects str(type(config)), so a naive subprocess.check_output payload just tells you <class 'bytes'>. Timing (sleep 4 -> 5s response) confirms execution is real, but a type is a miserable read channel.

1/2The error channel

Any exception raised inside the payload is echoed verbatim in the 500 body as Error processing configuration: <message>. Raising an exception whose message contains the command output turns this into a full read primitive - this is how the flag came out the first time.

2/2The intended channel

/uploads/<filename> reads a file out of the app's static dir and then deletes it, "to force each attacker to perform their own escalation." static is writable by the service account, so the clean path writes /root/flag.txt into static and reads it back through /uploads.

The privilege question that wasn't one

id over the error channel showed something worth stopping for:

output
uid=1000(pytraix) gid=1000(pytraix) euid=0(root) groups=1000(pytraix),27(sudo)

euid=0 with uid=1000 is the signature of a setuid binary. A second id run through /bin/sh instead showed plain pytraix - no euid=0 - which looked contradictory until a directory listing explained it:

output
-rwsr-xr-x 1 root root 14472 Oct 31  2025 /usr/local/bin/python3.9

Insight

The interpreter itself is setuid root. The Flask process already runs with effective UID 0, and any child it spawns directly inherits that - check_output(["id"]) forks straight from Python and reports root, while sh -c id goes through dash, which drops the effective UID on startup. There was no escalation puzzle: the web process was already root, and /root/flag.txt was readable immediately. "Use python3 SUID for root escalation" was the hint stating exactly this fact.

Result

session
$python3 solve.py
[*] /config POST -> 500
[*] server said: Error processing configuration: STAGED:RxR{d430d840-a968-42fa-9973-6f99e56ae2dc}
[+] GET /uploads/stage.txt -> RxR{d430d840-a968-42fa-9973-6f99e56ae2dc}
[+] FLAG: RxR{d430d840-a968-42fa-9973-6f99e56ae2dc}

The flag is written to /root/flag.txt fresh at container boot, so it's a per-instance UUID - this is the one the instance I held returned. The platform banner's RxR{R4lly_i_g0t_188_kdn4h} is the usual bait: a decoy string with the challenge's own id baked into it, planted for scrapers that grab the first RxR{...}-shaped thing they see and never submitted.

What actually mattered

  • Read the client bundle first. It carried the objective, the cipher, and the parser version.
  • Brute force the shift instead of trusting "VII" - cheap, and it proved the plaintext (typos included) was the author's own.
  • When a response only reflects a type, don't accept a type oracle - go find the exception echo.
  • euid != uid in id output means a setuid binary is in play; check the interpreter's mode bits before hunting for a separate escalation primitive.