CVE-2021-40438: Apache HTTP Server-Side Request Forgery (SSRF)
Apache · listed in the CISA catalog of actively exploited vulnerabilities since 2021-12-01.
- CVSS v3.1 (CVE record)
- 9.0
- critical
- EPSS (exploit probability, 30 days)
- >99.9%
- among the highest 0.1% of all CVEs
- Added to CISA KEV
- 2021-12-01
- US federal due date 2021-12-15
- Ubuntu priority
- medium
CVE-2021-40438 explained
CVE-2021-40438 is a server-side request forgery flaw in Apache HTTP Server's mod_proxy. A crafted request uri-path can make the proxy forward the request to an origin server chosen by the remote user. It affects Apache HTTP Server 2.4.48 and earlier. CISA lists it as known exploited, including in ransomware campaigns.
Impact
An unauthenticated remote attacker can make a server running mod_proxy send requests to arbitrary origin servers. Attack complexity is high, but no privileges or user interaction are needed. The scope is changed, so systems beyond the web server itself, such as internal services reachable from it, can be affected. Confidentiality, integrity and availability impacts are all rated high.
Who is affected
The apache2 source package is affected on Ubuntu 16.04 LTS, 18.04 LTS and 20.04 LTS. All three have fixed versions. Ubuntu 16.04 LTS is end of life, and its fix 2.4.18-2ubuntu3.17+esm3 is available only through Ubuntu Pro (ESM). Ubuntu 18.04 LTS is fixed in 2.4.29-1ubuntu4.18 and Ubuntu 20.04 LTS in 2.4.41-4ubuntu3.6, both in the standard archive. Standard support for both releases has ended, and later fixes come only with Ubuntu Pro.
Written with AI from the data on this page and checked against it automatically.
Official description
A crafted request uri-path can cause mod_proxy to forward the request to an origin server choosen by the remote user. This issue affects Apache HTTP Server 2.4.48 and earlier.
CISA required action: Apply updates per vendor instructions.
CISA notes
Upstream versions (CVE record)
From the CVE record published by the vendor or CVE numbering authority.
- Apache Software Foundation Apache HTTP ServerAffectedFixed in
- ≥ Apache HTTP Server 2.4, ≤ 2.4.48
not stated
| Product | Affected | Fixed in |
|---|---|---|
| Apache Software Foundation Apache HTTP Server |
| not stated |
Ubuntu and Debian releases
A server is vulnerable if it has a package built from the listed source package installed in a version lower than the fixed version for its release.
Ubuntu 20.04 LTS·apache2
Fixed: 2.4.41-4ubuntu3.6
Ubuntu 18.04 LTS·apache2
Fixed: 2.4.29-1ubuntu4.18
Ubuntu 16.04 LTS·apache2
fix via Ubuntu Pro
Fixed: 2.4.18-2ubuntu3.17+esm3
What to do
- Check whether
apache2is installed and whethermod_proxyis enabled on each server. - Update
apache2to the fixed version for your release, or a later one. - Restart the Apache service so the patched code is loaded.
- On Ubuntu 16.04 LTS, enable Ubuntu Pro (ESM) to get
2.4.18-2ubuntu3.17+esm3, and plan an upgrade to a supported release. - Plan Ubuntu Pro or a release upgrade for 18.04 and 20.04 systems to keep receiving future fixes.
Written with AI from the data on this page and checked against it automatically.
Check and fix on a server
Run on each Ubuntu or Debian server. Replace apache2 with the source package from the table above.
1. Show installed packages built from the source package, with their versions
dpkg-query -W -f='${binary:Package} ${Version} ${source:Package}\n' | awk '$3=="apache2"'2. Compare each installed version with the fixed version for your release from the table
I=INSTALLED_VERSION; F=FIXED_VERSION # replace both
dpkg --compare-versions "$I" lt "$F"; case $? in 0) echo vulnerable ;; 1) echo "fixed or newer" ;; *) echo "check the versions" ;; esac3. Install the fix
sudo apt update && sudo apt install --only-upgrade $(dpkg-query -W -f='${binary:Package} ${source:Package}\n' | awk '$2=="apache2"{print $1}')Services keep running the old code until they are restarted – restart the affected service or check with needrestart.
Rows marked “fix via Ubuntu Pro”: these fixes are only installable with an Ubuntu Pro subscription (ESM). Attach the machine first (sudo pro attach, then sudo pro enable esm-infra esm-apps), then run the commands above.
CISA's assessment (SSVC)
- Exploitation
- Exploited in the wild
- Automatable
- Yes – attackers can automate it at scale
- Technical impact
- Total – full control of the component or total information disclosure
Weakness: CWE-918 Server Side Request Forgery (SSRF)
Questions about CVE-2021-40438
- Why prioritize this CVE if Ubuntu rates it medium?
- CISA lists CVE-2021-40438 as known exploited and reports known ransomware use. The CVSS base severity is critical. Treat internet-facing Apache proxies as urgent.
- Am I affected if I do not use mod_proxy?
- The described flaw is in
mod_proxy. Servers that use it as a proxy are exposed. Updatingapache2is still the recommended fix on all affected releases. - Is a reboot required after updating?
- No reboot is needed for this package. Restart the Apache service after the update, because the running server keeps using the old code until it restarts.
Written with AI from the data on this page and checked against it automatically.
References
Vendor
- httpd.apache.org/security/vulnerabilities_24.html
- [httpd-users] 20210923 [users@httpd] 2.4.49 security fixes: more info
- [httpd-users] 20210923 Re: [users@httpd] 2.4.49 security fixes: more info
- [httpd-users] 20210923 [users@httpd] Re: [External] : [users@httpd] 2.4.49 security fixes: more info
- [httpd-users] 20210923 Re: [users@httpd] Re: [External] : [users@httpd] 2.4.49 security fixes: more info
- [httpd-bugs] 20211008 [Bug 65616] CVE-2021-36160 regression
Other advisories
Data: CISA Known Exploited Vulnerabilities (public domain) · CVE Program records incl. CISA ADP enrichment · OSV.dev (CC BY 4.0) incl. Ubuntu and Debian security data · FIRST EPSS · endoflife.date. Updated automatically – facts last changed 2026-11-21. Always confirm with the vendor's or distribution's advisory before patching.