Two files: model.pt (an exported classifier checkpoint) and flag.enc (two lines that both
look like Fernet tokens). The README warns against torch.load()-ing an untrusted checkpoint,
and it's right - a PyTorch checkpoint is a pickle, and a pickle can call whatever it likes on
the way to producing an object.
Reading the checkpoint without executing it
model.pt is just a zip:
model/data.pkl
model/extra/build_manifest.json
model/extra/deploy.log
model/data/0 .. model/data/5 (tensor storages)
model/data.pkl unpickles to {'state_dict': ..., 'meta': {...}}. Rather than run that pickle,
I gave pickle.Unpickler an allowlist of globals (tensor rebuild plus plain dicts) and a
persistent_load that returns nothing. The weights are irrelevant here anyway - what matters is
meta:
1{"model_name": "access-request-approver",
2 "arch": "MLP 6-16-8-1, ReLU, sigmoid output",
3 "export": {"tool": "mlexport 0.9.2", "git_commit": "b4471a9",
4 "commit_salt": "7c1e09d4ab52f3e8",
5 "note": "per-release salt, rotated by CI"}}
model/extra/deploy.log spells out the exact KDF the seal step used:
step=seal_artifact kdf="fernet_key = urlsafe_b64encode(sha256(build_id + ':' + commit_salt).digest())"
WARN build_manifest.json still lists staging_key (CI-4471)
and build_manifest.json carries the other half of the input, build_id:
1{"build_id": "rel-2026.04.27-b4471",
2 "sealed_output": "flag.enc",
3 "staging_key": "1flx3mAm_bnaSCx258i45aZVymCW0Pf0Qo9p2-Q_Cn0="}
The decoy
Pitfall
staging_key is 32 bytes decoded - exactly a Fernet key, and the obvious one to reach for
first. It opens line 0:
RxR{n0t_th1s_0n3_st4g1ng_k3y_1s_4_d3c0y}
That's the author telling you which line is bait, in the author's own voice - the WARN line in
the deploy log says the same thing in CI's. git_commit (b4471a9) is the other false trail,
sitting right next to commit_salt in the same export blob, which makes it the obvious value
to feed the KDF first.
The real key
Fernet is authenticated, so a wrong key can't silently produce garbage - the HMAC fails and you
get InvalidToken, which makes trying the derived key a clean yes/no test:
material = "rel-2026.04.27-b4471:7c1e09d4ab52f3e8" # build_id + ':' + commit_salt
key = urlsafe_b64encode(sha256(material).digest())
Decrypting line 1 with that key:
RxR{m3t4d4t4_n3v3r_l13s}
Insight
The two tokens cross-check perfectly: line 1 only opens with the derived key, line 0 only opens
with the manifest's staging_key, each fails with InvalidToken under the other key. Nothing
here needed the weights, a GPU, or even a PyTorch install - the leak is entirely in the metadata
the export tool wrote alongside the weights, and the one piece of real secret material (the
per-release salt) ships inside the checkpoint that was supposed to contain weights only.
solve.py runs the whole thing from the shipped files: zip inspection, restricted unpickle of
data.pkl, KDF from the CI log, and the per-line decrypt that separates the decoy from the real
token.
Flag
RxR{m3t4d4t4_n3v3r_l13s}