1. CVE archive
  2. 2017
  3. CVE-2017-9798

CVE-2017-9798

7.5 High severity CVSS v3.1 · source NVD CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N 7.5 – High

Description

Apache httpd allows remote attackers to read secret data from process memory if the Limit directive can be set in a user's .htaccess file, or if httpd.conf has certain misconfigurations, aka Optionsbleed. This affects the Apache HTTP Server through 2.2.34 and 2.4.x through 2.4.27. The attacker sends an unauthenticated OPTIONS HTTP request when attempting to read secret data. This is a use-after-free issue and thus secret data is not always sent, and the specific data depends on many factors including configuration. Exploitation with .htaccess can be blocked with a patch to the ap_limit_section function in server/core.c.

Affected products

VendorProductVersionPlatform
apache http server <= 2.2.34 –
apache http server 2.4.0 –
apache http server 2.4.1 –
apache http server 2.4.2 –
apache http server 2.4.3 –
apache http server 2.4.4 –
apache http server 2.4.6 –
apache http server 2.4.7 –
apache http server 2.4.9 –
apache http server 2.4.10 –
apache http server 2.4.12 –
apache http server 2.4.16 –
apache http server 2.4.17 –
apache http server 2.4.18 –
apache http server 2.4.20 –
apache http server 2.4.23 –
apache http server 2.4.25 –
apache http server 2.4.26 –
apache http server 2.4.27 –
debian debian linux 7.0 –
debian debian linux 8.0 –
debian debian linux 9.0 –
All 351 Apache Http Server vulnerabilities

Vulnerability type

CWE-416 Use After Free

The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory belongs to the code that operates on the new pointer.

Impact on systems

ScopeImpact
Integrity Modify Memory
The use of previously freed memory may corrupt valid data, if the memory area in question has been allocated and used properly elsewhere.
Availability DoS: Crash, Exit, or Restart
If chunk consolidation occurs after the use of previously freed data, the process may crash when invalid data is used as chunk information.
Confidentiality Read Memory
Read operations on freed memory can sometimes leak sensitive information instead of causing a crash
Integrity, Confidentiality, Availability Execute Unauthorized Code or Commands
If malicious data is entered before chunk consolidation can take place, it may be possible to take advantage of a write-what-where primitive to execute arbitrary code. If the newly allocated data happens to hold a class, in C++ for example, various function pointers may be scattered within the heap data. If one of these function pointers is overwritten with an address to valid shellcode, execution of arbitrary code can be achieved.

How to prevent it

Architecture and Design · Language Selection Choose a language that provides automatic memory management.
Implementation · Attack Surface Reduction When freeing pointers, be sure to set them to NULL once they are freed. However, the utilization of multiple or complex data structures may lower the usefulness of this strategy.

All 9,640 CWE-416 CVEs, with trend and prevention

Source: MITRE CWE catalog · cwe.mitre.org