CVE-2021-44790·Apache vulnerability
A carefully crafted request body can cause a buffer overflow in the mod_lua multipart parser (r:parsebody() called from Lua scripts). The Apache httpd team is not aware of an exploit for the vulnerabilty though it might be possible to craft one. This issue affects Apache HTTP Server 2.4.51 and earlier.
- Severity
- critical
- Software
- Apache
- Fixed in
- 2.4.52-1
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at 97% — in the top 0.1% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Affected versions
Until: 2.4.52-1
Fixed in: 2.4.52-1
How to fix this CVE
Immediately upgrade Apache HTTP Server to version 2.4.52-1 or later to patch the mod_lua multipart parser buffer overflow vulnerability. Organizations running Apache 2.4.51 and earlier with mod_lua enabled should prioritize this update, as the flaw allows unauthenticated remote attackers to trigger memory corruption through specially crafted HTTP request bodies. Verify the fix by confirming the installed version matches or exceeds the patched release.
sudo dnf update httpdDefensia detects this vulnerability
What an exploitation attempt looks like
Sample log line indicative of exploitation attempts:
POST|PUT request with Content-Type: multipart/form-data and Content-Length header value exceeding typical boundaries (e.g., >10MB without legitimate justification); presence of malformed boundary markers or chunks without proper length declaration in multipart payload.WAF mitigation (if patching is not yet possible)
Add this rule to your WAF to block exploitation attempts while you schedule the patch.
Implement WAF rules to limit multipart/form-data request body size to reasonable thresholds (e.g., 5-10MB max), enforce strict Content-Length validation, block requests with malformed multipart boundaries, and rate-limit POST/PUT requests from single IPs targeting Lua-enabled endpoints.How to check if you are affected
- Step 1: Check installed Apache version with 'apache2ctl -v' (Debian/Ubuntu) or 'httpd -v' (RHEL/CentOS) and confirm it is 2.4.52-1 or later.
- Step 2: Verify if mod_lua is enabled by running 'apache2ctl -M | grep lua_module' (Debian/Ubuntu) or 'httpctl -M | grep lua_module' (RHEL/CentOS); if it appears in output, the vulnerable parser is active.
- Step 3: Search Apache error and access logs for unusual multipart form data submissions or requests with oversized Content-Length headers using 'grep -i multipart /var/log/apache2/error.log' or 'grep -E 'Content-Length: [0-9]{7,}' /var/log/apache2/access.log'.
- Step 4: After applying updates, re-run 'apache2ctl -v' or 'httpd -v' to confirm version is 2.4.52-1 or newer, then restart Apache with 'sudo systemctl restart apache2' (Debian/Ubuntu) or 'sudo systemctl restart httpd' (RHEL/CentOS).
FAQ
What is CVE-2021-44790?
CVE-2021-44790 is a critical buffer overflow vulnerability in Apache mod_lua's multipart request parser that occurs when the r:parsebody() Lua function processes a malicious HTTP request body. An unauthenticated attacker can exploit this remotely to corrupt memory and potentially execute arbitrary code.
Is CVE-2021-44790 being actively exploited?
CVE-2021-44790 is not currently listed in CISA's Known Exploited Vulnerabilities catalog, but public proof-of-concept code exists on Exploit-DB, making active exploitation a realistic threat.
What versions of Apache are affected by CVE-2021-44790?
Apache HTTP Server versions 2.4.51 and all earlier releases are vulnerable. The vulnerability is fixed in version 2.4.52-1 and subsequent releases.
How do I check if my server is vulnerable to CVE-2021-44790?
Run 'apache2ctl -v' or 'httpd -v' to check your version; if it returns 2.4.51 or lower and 'apache2ctl -M | grep lua_module' shows the mod_lua module is loaded, your server is vulnerable.
Does Defensia detect CVE-2021-44790?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Apache is installed on a monitored server, CVE-2021-44790 will appear in your dashboard with remediation steps.
Related Apache CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2021-44790. Free for 1 server.
Get started free