CyberSecBulletin
CVE-2021-40438Exploited in the wildNVD status: Analyzed

Apache HTTP Server-Side Request Forgery (SSRF)

CVE-2021-40438 is a critical-severity server-side request forgery vulnerability in Apache HTTP Server from Apache, with a CVSS 3.1 base score of 9.0 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. Affected Apache HTTP Server versions: Apache HTTP Server 2.4 through 2.4.48. The record does not name a fixed version, so check the vendor advisory. CISA added it to the Known Exploited Vulnerabilities catalogue on December 1, 2021, which means attacks have been observed in the wild, including in ransomware campaigns.

Patch now

Attackers are already exploiting this vulnerability, according to CISA.

What to do

  1. Update Sinec Nms to 1.0.3 or a later version.
  2. Update Sinema Remote Connect Server to 3.1 or a later version.
  3. CISA's required action: Apply updates per vendor instructions.
  4. Read the advisory on httpd.apache.org for workarounds and exact fixed builds.
  5. Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.

Affected products and versions

VendorProductAffected versionsFixed in
ApacheApache HTTP ServerApache HTTP Server 2.4 through 2.4.48Not stated
ResfRocky Linux8.0Not stated
Red HatEnterprise Linux8.0Not stated
Red HatEnterprise Linux EUS8.1; 8.2; 8.4; 8.6; 8.8Not stated
Red HatEnterprise Linux For Arm 648.0Not stated
Red HatEnterprise Linux For Arm 64 EUS8.6; 8.8Not stated
Red HatEnterprise Linux For IBM Z Systems7.0_s390x; 8.0Not stated
Red HatEnterprise Linux For IBM Z Systems EUS8.1; 8.4; 8.8Not stated
Red HatEnterprise Linux For IBM Z Systems EUS S390x8.2Not stated
Red HatEnterprise Linux For Power Big Endian7.0Not stated
Red HatEnterprise Linux For Power Little Endian7.0; 8.0Not stated
Red HatEnterprise Linux For Power Little Endian EUS8.1; 8.2; 8.4; 8.6; 8.8Not stated
Red HatEnterprise Linux For Scientific Computing7.0Not stated
Red HatEnterprise Linux Server7.0Not stated
Red HatEnterprise Linux Server AUS7.2; 7.3; 7.4; 7.6; 7.7; 8.2; 8.4; 8.6Not stated
Red HatEnterprise Linux Server For Power Little Endian Update Services For SAP Solutions7.6; 7.7; 8.1; 8.2; 8.4; 8.6; 8.8Not stated
Red HatEnterprise Linux Server TUS7.6; 7.7; 8.2; 8.4; 8.6; 8.8Not stated
Red HatEnterprise Linux Server Update Services For SAP Solutions7.6; 7.7Not stated
Red HatEnterprise Linux Update Services For SAP Solutions8.1; 8.2; 8.4; 8.6; 8.8Not stated
Red HatEnterprise Linux Workstation7.0Not stated
Red HatJboss Core Services1.0Not stated
Red HatSoftware Collections1.0Not stated
ApacheHTTP Server2.4.48 and earlierNot stated
Fedora ProjectFedora34; 35Not stated
DebianDebian Linux9.0; 10.0; 11.0Not stated

Version data comes from the organisation that assigned the CVE; 14 further products are omitted here. Confirm against the vendor advisory before deciding you are unaffected.

How the severity score breaks down

Attack vector
NetworkCan be exploited remotely over a network, including the internet.
Attack complexity
HighSuccess depends on conditions outside the attacker's control.
Privileges required
NoneNo account or login is needed.
User interaction
NoneNo action by a victim is required.
Scope
ChangedThe attack can reach beyond the vulnerable component into other systems.
Confidentiality
HighAll data handled by the component can be read.
Integrity
HighData or code can be modified at will.
Availability
HighThe component can be taken down completely.

Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H. Scored by NVD.

Scoring systemScoreSeverityScored by
CVSS 3.19.0CriticalNVD
CVSS 3.19.0CriticalCISA (ADP)
CVSS 2.06.8MediumNVD

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.

Source: the CVE record as published by its numbering authority, via NVD and CVE.org.

The underlying weakness: Server-Side Request Forgery

The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.

How developers prevent this class of flaw

  • If there is a known list of applications, IP, hostname, and/or domains to which the product is allowed to communicate, then use allowlists to ensure that outgoing requests are restricted to these known entities. The allowlists could be in the application code or possibly enforced by firewalls or network segmentation.
  • If the product is expected to be able to connect to arbitrary IP addresses or domains, consider using a denylist that includes private network addresses, internal domain names, etc. The denylist could be in the application code or possibly enforced by firewalls or network segmentation.

More Server-Side Request Forgery vulnerabilities (CWE-918)

Timeline

  1. CVE record published.
  2. CISA published its SSVC assessment (exploitation: active, automatable: yes, technical impact: total).
  3. Added to CISA's Known Exploited Vulnerabilities catalogue.
  4. Deadline for US federal agencies to remediate, set by CISA.
  5. Record last changed materially (score, affected products, status or references).

References

Other references

Other vulnerabilities in Apache HTTP Server

All Apache HTTP Server vulnerabilities

Recent Server-Side Request Forgery vulnerabilities

Spotted an error? Tell us.