|
1 | | -# Security Policy |
| 1 | + |
| 2 | +# Apache httpd Security Policy |
| 3 | + |
| 4 | +This document is an overview of the security model for Apache |
| 5 | +httpd. Security vulnerabilities reported to the project need to |
| 6 | +demonstrate how an attacker can violate the security model. |
2 | 7 |
|
3 | 8 | ## Supported Versions |
4 | 9 |
|
5 | 10 | Currently the only supported version is the latest patch release of the |
6 | | -2.4.x stable branch. |
| 11 | +`2.4.x` stable branch. Vulnerabilities which exist *only* in |
| 12 | +unreleased branches (such as `trunk`) may be treated as normal bug |
| 13 | +reports. |
7 | 14 |
|
8 | | -## Security Updates |
| 15 | +## Reporting Vulnerabilities |
9 | 16 |
|
10 | | -[Apache 2.4 Security Vulnerabilities](http://httpd.apache.org/security/vulnerabilities_24.html) |
| 17 | +For information on how to report a new security problem please see |
| 18 | +[here](http://httpd.apache.org/security_report.html). The process of |
| 19 | +reporting and handling vulnerabilities is out of scope for this |
| 20 | +document. |
11 | 21 |
|
12 | | -## Reporting a Vulnerability |
| 22 | +For a list of already-addressed vulnerabilities, see [Apache 2.4 Security |
| 23 | +Vulnerabilities](http://httpd.apache.org/security/vulnerabilities_24.html) |
13 | 24 |
|
14 | | -For information on how to report a new security problem please see |
15 | | -[here](http://httpd.apache.org/security_report.html) |
| 25 | +## Model scope |
| 26 | + |
| 27 | +If an issue is reported against an aspect of the security model which |
| 28 | +is not documented here, it MUST be accompanied by a clear description |
| 29 | +of that aspect the model, showing why a trust boundary exists and how |
| 30 | +it is violated. It is helpful to use references to documentation |
| 31 | +and/or demonstrate common usage patterns. |
| 32 | + |
| 33 | +Any security vulnerability SHOULD be reproducible: |
| 34 | + |
| 35 | +1. under a reasonable, supported configuration. |
| 36 | +2. without using third-party modules, or modules explicitly designed |
| 37 | + for debugging. |
| 38 | +3. under a standard build on a supported platform. |
| 39 | + |
| 40 | +Issues which are reproducible only using instrumented builds (such as |
| 41 | +ASAN, or under valgrind) should be clearly explained as such. |
| 42 | + |
| 43 | +## Basic model |
| 44 | + |
| 45 | +Processing of requests by remote untrusted users (HTTP clients) MUST |
| 46 | +NOT crash or prematurely terminate server processes, nor gain code |
| 47 | +execution privileges. In the default configuration, timeouts are |
| 48 | +applied to most aspects of HTTP request handling such that a single |
| 49 | +client SHOULD NOT tie up a single processing thread or process |
| 50 | +indefinitely. |
| 51 | + |
| 52 | +It is the responsibility of the server administrator to tune and |
| 53 | +configure httpd appropriately to the operating environment, for |
| 54 | +example adjusting MPM limits (see |
| 55 | +https://httpd.apache.org/docs/trunk/misc/security_tips.html). |
| 56 | + |
| 57 | +Denial of service attacks are expected to be mitigated at firewall or |
| 58 | +network level. It is expected that an attacker who is able to |
| 59 | +establish multiple simultaneous connections to the server will, to |
| 60 | +some extent, deny service to other remote users. |
| 61 | + |
| 62 | +Example vulnerabilities which violated the model: CVE-2026-23918, |
| 63 | +CVE-2004-0786. |
| 64 | + |
| 65 | +## Resource Consumption |
| 66 | + |
| 67 | +Handling requests entails resource consumption (CPU, memory, disk |
| 68 | +space for logs, etc). It is expected that resource consumption by the |
| 69 | +server is at worst proportional to the volume of network traffic. |
| 70 | + |
| 71 | +Memory consumption by a single request should be capped, with |
| 72 | +configurable limits; e.g. LimitRequestFields limits the RAM |
| 73 | +consumption by HTTP headers, LimitXMLRequestBody limits the RAM |
| 74 | +consumption by parsing XML request documents. |
| 75 | + |
| 76 | +Example vulnerabilities which violated the model: CVE-2004-0942 |
| 77 | + |
| 78 | +## Privilege separation on Unix platforms |
| 79 | + |
| 80 | +On Unix platforms, when httpd is started as the root user, privilege |
| 81 | +separation is used between the parent process which retains root |
| 82 | +privileges, and child processes (and threads). Child processes/threads |
| 83 | +run as a less-privileged user and group which is configurable via the |
| 84 | +`mod_unixd` module, https://httpd.apache.org/docs/2.4/mod/mod_unixd.html |
| 85 | + |
| 86 | +The less-privileged user: |
| 87 | + |
| 88 | +* cannot obtain root privileges, |
| 89 | +* cannot read or truncate log files, |
| 90 | +* retains access to e.g. any private TLS key data loaded in memory. |
| 91 | + |
| 92 | +Use of platform-specific sandboxing or security features (such as use |
| 93 | +of containers, chroot, SELinux) are out of scope for this security |
| 94 | +model. |
| 95 | + |
| 96 | +Example vulnerabilities which violated the model: CVE-2007-3304, |
| 97 | +CVE-2012-0031. |
| 98 | + |
| 99 | +## Delegated Configuration |
| 100 | + |
| 101 | +Server configuration can be delegated to trusted local site authors by |
| 102 | +allowing use of .htaccess files in non-default configurations. Local |
| 103 | +site authors are trusted to not attack the server with malformed or |
| 104 | +malicious .htaccess files (for example, files of excessive size). |
| 105 | + |
| 106 | +In configurations supporting in-process scripting language interpreters |
| 107 | +which are not sandboxed, such as `mod_lua` or `mod_php`, local site |
| 108 | +authors have equivalent privileges to the less-privileged server user. |
| 109 | + |
| 110 | +(### TODO something about AllowOverride) |
| 111 | + |
| 112 | +## Dependent Services |
| 113 | + |
| 114 | +Many configurations depend on backend servers or services which are |
| 115 | +trusted entities. |
| 116 | + |
| 117 | +* Backend servers accessed in a proxy configuration should not be able |
| 118 | + to influence HTTP protocol framing logic in the frontend (client) |
| 119 | + ("response splitting" attacks). |
| 120 | + |
| 121 | +* Services used for authentication or caching privileged/protected |
| 122 | + data (Redis/Valkey caches, database or LDAP servers) are trusted not |
| 123 | + to attack the web server. |
| 124 | + |
| 125 | +Example vulnerabilities which violated the model: CVE-2026-33523, |
| 126 | +CVE-2024-42516. |
0 commit comments