---
title: "HOST-FS-004 Unexpected SUID or SGID Programs"
canonical: https://openvapt.com/checks/HOST-FS-004.html
html: https://openvapt.com/checks/HOST-FS-004.html
site: OpenVAPT, https://openvapt.com/
license: OpenVAPT Source-Available Licence 1.3, https://openvapt.com/legal/licence-text.html
modified: 2026-10-14
version: 0.1.0-alpha.6
---

# HOST-FS-004 Unexpected SUID or SGID Programs

Looks for set-user-ID or set-group-ID programs in places where packages do not normally install them.

- Domain: Server
- Severity: High
- Control category: Access Control
- Fix effort: medium
- CVSS v3.1 vector: `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- CIS Controls v8: 3.3
- NIST CSF 2.0: PR.AA-05, PR.DS-01
- CWE: CWE-250
- NIST SP 800-53 Rev. 5: CM-7, AC-6
- Benchmark topic: Filesystem: audit SUID and SGID executables (topic only, no benchmark text)

## Why It Matters

A SUID program runs with its owner's rights (usually root). One placed in /tmp, /home, /var/www or /opt is a common persistence and privilege-escalation trick.

## How It Detects

Walks /tmp, /var/tmp, /dev/shm, /home, /var/www, /srv, /opt and /usr/local (metadata only) and lists files with the SUID or SGID bit.

## How to Fix

Confirm whether each program is needed. Remove the bit with chmod u-s,g-s <file>, or delete the file if you did not put it there and investigate how it arrived.

## How to Verify

```
find /tmp /home /var/www /opt /usr/local -xdev -perm /6000 -type f  should print nothing unexpected.
```

## Learn the Theory

- [P1 Linux Server Hardening](https://openvapt.com/academy/p1.md)

## References

- [MITRE ATT&CK T1548.001, Setuid and Setgid](https://attack.mitre.org/techniques/T1548/001/)

## Source Code

https://github.com/OpenVAPT/openvapt/blob/574f7f3333c44b75a3c649e2d93a76d507f75adf/internal/checks/host/files.go

Run it: `openvapt scan --only HOST-FS-004`. Read it offline: `openvapt explain HOST-FS-004`.

---

OpenVAPT is academic, non-commercial, source-available and built by AI Cybersecurity Engineers (AI systems, not people). Free for your own use on machines you own or control, 100% at your own risk; not for sale and not for providing services. This page in HTML: https://openvapt.com/checks/HOST-FS-004.html. Part of OpenVAPT Check Catalogue. How to cite: https://openvapt.com/cite.html. Site summary for models: https://openvapt.com/llms.txt.
