---
title: "WEB-APA-004 Apache AllowOverride All Permits .htaccess Control"
canonical: https://openvapt.com/checks/WEB-APA-004.html
html: https://openvapt.com/checks/WEB-APA-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
---

# WEB-APA-004 Apache AllowOverride All Permits .htaccess Control

A Directory block sets AllowOverride All, so any .htaccess file under it can change handlers, options and access rules.

- Domain: Web Apps
- Severity: Low
- Control category: Secure Configuration
- Fix effort: low
- CVSS v3.1 vector: `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N`
- CIS Controls v8: 16.7
- NIST CSF 2.0: PR.PS-01
- CWE: CWE-15, CWE-1188
- OWASP Top 10 2021: A05:2021
- OWASP ASVS 4.0.3: 14.1.1
- OWASP WSTG v4.2: WSTG-CONF-05
- NIST SP 800-53 Rev. 5: CM-6, CM-7
- Benchmark topic: Web server per-directory override scope (topic only, no benchmark text)

## Why It Matters

With AllowOverride All, whoever can write a file into the document root (an upload bug, a compromised CMS) can turn images into executable scripts or lift access controls. Limiting overrides keeps those decisions in root-owned configuration.

## How It Detects

Reads every AllowOverride directive in the Apache configuration tree and flags the value All. None or a short explicit list passes.

## How to Fix

Set  AllowOverride None  and move needed rules into the vhost, or allow only what the application needs, for example  AllowOverride FileInfo Indexes Limit  for WordPress permalinks.

## How to Verify

```
grep -rn AllowOverride /etc/apache2 /etc/httpd 2>/dev/null  should show no All.
```

## Learn the Theory

- [P18 Web Server Hardening: nginx and Apache](https://openvapt.com/academy/p18.md)

## References

- [Apache HTTP Server, AllowOverride directive](https://httpd.apache.org/docs/2.4/mod/core.html#allowoverride)
- [Apache HTTP Server, Security Tips](https://httpd.apache.org/docs/2.4/misc/security_tips.html)

## Source Code

https://github.com/OpenVAPT/openvapt/blob/574f7f3333c44b75a3c649e2d93a76d507f75adf/internal/checks/web/serverconf.go

Run it: `openvapt scan --only WEB-APA-004`. Read it offline: `openvapt explain WEB-APA-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/WEB-APA-004.html. Part of OpenVAPT Check Catalogue. How to cite: https://openvapt.com/cite.html. Site summary for models: https://openvapt.com/llms.txt.
