high CVSS 7.5

CVE-2024-43394·Apache vulnerability

Server-Side Request Forgery (SSRF) in Apache HTTP Server on Windows allows to potentially leak NTLM hashes to a malicious server via  mod_rewrite or apache expressions that pass unvalidated request input. This issue affects Apache HTTP Server: from 2.4.0 through 2.4.63. Note:  The Apache HTTP Server Project will be setting a higher bar for accepting vulnerability reports regarding SSRF via UNC paths. The server offers limited protection against administrators directing the server to open UNC paths. Windows servers should limit the hosts they will connect over via SMB based on the nature of NTLM authentication.

Severity
high
Software
Apache
Fixed in
2.4.64
Published
2025-07-10

Affected versions

From: 2.4.0

Until: 2.4.64

Fixed in: 2.4.64

How to fix this CVE

Upgrade Apache HTTP Server to version 2.4.64 or later to patch the SSRF vulnerability that could expose NTLM credential hashes on Windows systems. The vulnerability exists in mod_rewrite and Apache expression handlers that process unvalidated user input without proper sanitization. Windows administrators should prioritize this patch and restrict outbound SMB connections at the firewall level as a defense-in-depth measure.

sudo dnf update httpd

Defensia detects this vulnerability

What an exploitation attempt looks like

Sample log line indicative of exploitation attempts:

GET|POST requests containing encoded or literal UNC path patterns (\\\\servername\\share or %5c%5cservername%5c) in mod_rewrite rules, or request parameters that reference file:// URIs or SMB protocol handlers in Apache expression evaluations

WAF mitigation (if patching is not yet possible)

Add this rule to your WAF to block exploitation attempts while you schedule the patch.

Implement input validation rules that reject requests containing UNC path syntax (backslash sequences, file:// schemes) in query parameters and request bodies that are evaluated by mod_rewrite. Deploy rate-limiting on requests to prevent credential hash leakage attempts. Block outbound SMB (port 445) connections from the web server at the network level.

How to check if you are affected

  1. Step 1: Check Apache version with 'apache2ctl -v' (Debian/Ubuntu) or 'httpd -v' (RHEL/CentOS/Amazon Linux) and confirm it is below 2.4.64
  2. Step 2: Verify mod_rewrite is enabled by running 'apache2ctl -M | grep rewrite' and check for rewrite rules that accept user input in REQUEST_URI or QUERY_STRING
  3. Step 3: Search Apache access and error logs for patterns like 'UNC', 'file://', or unusual SMB connection attempts using 'grep -i "\\\\\\" /var/log/apache2/access.log' on Windows systems
  4. Step 4: After patching, re-run 'apache2ctl -v' or 'httpd -v' to confirm version is 2.4.64 or higher and restart Apache with 'sudo systemctl restart apache2' or 'sudo systemctl restart httpd'

FAQ

What is CVE-2024-43394?

This is a Server-Side Request Forgery (SSRF) vulnerability in Apache HTTP Server on Windows that allows attackers to leverage mod_rewrite and Apache expressions to craft requests that access UNC paths, potentially leaking NTLM authentication hashes to attacker-controlled servers.

Is CVE-2024-43394 being actively exploited?

No, according to CISA's Known Exploited Vulnerabilities (KEV) catalog, CVE-2024-43394 is not currently being actively exploited in the wild, and no public exploit code is available.

What versions of Apache are affected by CVE-2024-43394?

Apache HTTP Server versions 2.4.0 through 2.4.63 are vulnerable; version 2.4.64 and later contain the fix.

How do I check if my server is vulnerable to CVE-2024-43394?

Run 'apache2ctl -v' or 'httpd -v' to display your installed version. If the version number is 2.4.63 or lower and your server is running Windows, your system is vulnerable.

Does Defensia detect CVE-2024-43394?

Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Apache is installed on a monitored server, CVE-2024-43394 will appear in your dashboard with remediation steps.

Related Apache CVEs

CVE-2024-38476CVSS 9.8Vulnerability in core of Apache HTTP Server 2.4.59 and earlier are vulnerably to information disclosure, SSRF or local script execution via backend applications whose response headers are malicious or exploitable. Users are recommended to upgrade to version 2.4.60, which fixes this issue.
CVE-2024-38474CVSS 9.8Substitution encoding issue in mod_rewrite in Apache HTTP Server 2.4.59 and earlier allows attacker to execute scripts in directories permitted by the configuration but not directly reachable by any URL or source disclosure of scripts meant to only to be executed as CGI. Users are recommended to upgrade to version 2.4.60, which fixes this issue. Some RewriteRules that capture and substitute unsafely will now fail unless rewrite flag "UnsafeAllow3F" is specified.
CVE-2024-38475CVSS 9.1Improper escaping of output in mod_rewrite in Apache HTTP Server 2.4.59 and earlier allows an attacker to map URLs to filesystem locations that are permitted to be served by the server but are not intentionally/directly reachable by any URL, resulting in code execution or source code disclosure. Substitutions in server context that use a backreferences or variables as the first segment of the substitution are affected.  Some unsafe RewiteRules will be broken by this change and the rewrite flag "UnsafePrefixStat" can be used to opt back in once ensuring the substitution is appropriately constrained.
CVE-2025-23048CVSS 9.1In some mod_ssl configurations on Apache HTTP Server 2.4.35 through to 2.4.63, an access control bypass by trusted clients is possible using TLS 1.3 session resumption. Configurations are affected when mod_ssl is configured for multiple virtual hosts, with each restricted to a different set of trusted client certificates (for example with a different SSLCACertificateFile/Path setting). In such a case, a client trusted to access one virtual host may be able to access another virtual host, if SSLStrictSNIVHostCheck is not enabled in either virtual host.
CVE-2025-58098CVSS 8.3Apache HTTP Server 2.4.65 and earlier with Server Side Includes (SSI) enabled and mod_cgid (but not mod_cgi) passes the shell-escaped query string to #exec cmd="..." directives. This issue affects Apache HTTP Server before 2.4.66. Users are recommended to upgrade to version 2.4.66, which fixes the issue.

References

Track CVEs across your fleet automatically

Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-43394. Free for 1 server.

Get started free