Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2022-28614

CVE-2022-28614: Apache HTTP Server Buffer Overflow Flaw

CVE-2022-28614 is a buffer overflow vulnerability in Apache HTTP Server 2.4.53 and earlier versions that may allow unintended memory reads. This article covers technical details, affected versions, and mitigation.

Updated:

CVE-2022-28614 Overview

CVE-2022-28614 is an information disclosure vulnerability in Apache HTTP Server 2.4.53 and earlier. The flaw resides in the ap_rwrite() function, which may read unintended memory when an attacker causes the server to reflect very large input through ap_rwrite() or ap_rputs(). Attackers can trigger this condition using interfaces such as the mod_luar:puts() function. Third-party modules compiled and distributed separately from Apache HTTP Server that call ap_rputs with strings of INT_MAX or larger must be recompiled against current headers to resolve the issue. The vulnerability is classified under [CWE-190] integer overflow or wraparound and affects deployments across Apache HTTP Server, Fedora, and NetApp Clustered Data ONTAP.

Critical Impact

A remote, unauthenticated attacker can cause the server to disclose unintended process memory contents through reflected responses generated by ap_rwrite() or ap_rputs().

Affected Products

  • Apache HTTP Server 2.4.53 and earlier
  • Fedora 35 and Fedora 36
  • NetApp Clustered Data ONTAP

Discovery Timeline

  • 2022-06-09 - CVE-2022-28614 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2022-28614

Vulnerability Analysis

The vulnerability stems from an integer overflow condition [CWE-190] in the Apache HTTP Server output functions ap_rwrite() and ap_rputs(). These functions accept signed integer length parameters describing the size of buffers reflected back to clients. When a caller passes a string of size INT_MAX or larger, internal length calculations wrap, causing the server to copy memory beyond the intended buffer boundary into the response stream.

The most accessible trigger path is mod_lua. The Lua API r:puts() forwards attacker-controllable content directly to ap_rputs(). An operator running Lua scripts that reflect untrusted input can therefore expose adjacent heap memory to remote clients without authentication.

The impact is confidentiality loss only. The integer overflow does not corrupt memory or alter control flow. Returned bytes may contain fragments of other request data, internal state, or sensitive process memory.

Root Cause

The root cause is improper handling of integer length arguments in ap_rputs and ap_rwrite. Length parameters were not validated against INT_MAX, allowing arithmetic to wrap when very large strings were passed. The fix updates the function prototypes and length handling, which is why externally compiled modules must be rebuilt against current Apache headers.

Attack Vector

Exploitation requires network access to a vulnerable Apache HTTP Server instance that reflects attacker-supplied data of sufficient size through ap_rwrite() or ap_rputs(). The mod_luar:puts() function is the documented vector. No authentication or user interaction is required. See the Apache HTTP Server Vulnerabilities advisory for protocol-level details.

Detection Methods for CVE-2022-28614

Indicators of Compromise

  • HTTP responses from Apache containing binary or non-printable bytes adjacent to expected reflected content.
  • Unusually large request bodies or query parameters sent to endpoints backed by mod_lua scripts using r:puts().
  • Apache error log entries indicating oversized writes from custom or third-party modules calling ap_rputs.

Detection Strategies

  • Inventory all running Apache HTTP Server instances and record versions; flag any build at or below 2.4.53.
  • Audit loaded modules for mod_lua usage and review Lua scripts that invoke r:puts() or r:write() on user-controlled data.
  • Inspect third-party or in-house modules linked against older Apache headers that call ap_rputs with caller-supplied length values.

Monitoring Recommendations

  • Alert on outbound HTTP responses with response sizes that exceed expected content length envelopes for known endpoints.
  • Monitor web application firewall logs for requests containing payloads near or exceeding 2 GB in length.
  • Track package manager events for httpd updates to confirm patched versions are deployed across the fleet.

How to Mitigate CVE-2022-28614

Immediate Actions Required

  • Upgrade Apache HTTP Server to a version later than 2.4.53 as published in the vendor advisory.
  • Recompile any out-of-tree modules that call ap_rputs against current Apache headers to inherit the corrected prototype.
  • Review and constrain mod_lua scripts so that r:puts() is not invoked on untrusted input of unbounded size.

Patch Information

Apache released fixed builds documented in the Apache HTTP Server 2.4 Vulnerabilities advisory. Distribution-specific patches are available through the Fedora package announcement, Gentoo GLSA 202208-20, and the NetApp Security Advisory NTAP-20220624-0005.

Workarounds

  • Disable mod_lua if it is not required by the application stack.
  • Enforce request size limits using LimitRequestBody and a fronting web application firewall to block payloads approaching INT_MAX.
  • Restrict access to administrative endpoints that invoke reflective Lua handlers until patches are applied.
bash
# Configuration example: cap request body size and disable mod_lua if unused
LimitRequestBody 10485760
# Comment the LoadModule directive below if mod_lua is not in use
# LoadModule lua_module modules/mod_lua.so

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.