CVE-2025-58098
Apache HTTP Server vulnerability analysis and mitigation

Overview

CVE-2025-58098 is a command injection vulnerability in Apache HTTP Server affecting versions 2.4.65 and earlier. When Server Side Includes (SSI) is enabled alongside mod_cgid (but not mod_cgi), the server incorrectly passes the shell-escaped query string to #exec cmd="..." directives, enabling arbitrary command execution. The vulnerability was published on December 5, 2025, and is fixed in Apache HTTP Server 2.4.66. It carries a CVSS v3.1 base score of 8.3 (High) (Apache Advisory, Feedly).

Technical details

The root cause is classified as CWE-201 (Insertion of Sensitive Information Into Sent Data). When mod_cgid is active and SSI is enabled, Apache HTTP Server improperly forwards the shell-escaped query string directly to #exec cmd directives within SSI pages, without adequate sanitization. This allows an attacker to inject shell commands via a crafted HTTP query string that gets executed by the CGI daemon process. The flaw is specific to mod_cgid and does not affect configurations using mod_cgi (Apache Advisory, Feedly).

Impact

Successful exploitation allows a low-privileged authenticated attacker to execute arbitrary commands on the server with the privileges of the web server process. The CVSS scoring reflects high confidentiality and integrity impact, with low availability impact, meaning an attacker could read sensitive server-side data, modify files, or pivot to further compromise the host. The vulnerability affects a broad range of downstream products including IBM Cloud Pak for Business Automation, IBM Business Automation Workflow, Oracle HTTP Server, Microsoft Azure Linux distributions, and Apple macOS (Feedly, Apple macOS Sequoia, Oracle CPU Jan 2026).

Exploitability

As of the time of reporting, there is no confirmed public proof-of-concept exploit and no evidence of active in-the-wild exploitation. A GitHub repository (dhmosfunk/CVE-2025-58098) has been observed with iterative commits, suggesting active PoC development activity, though no weaponized exploit has been confirmed. The EPSS score is approximately 0.041%, indicating low near-term exploitation probability. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog (Feedly, GitHub PoC).

Exploitation steps

  1. Reconnaissance: Identify Apache HTTP Server instances (versions ≤ 2.4.65) with SSI enabled and mod_cgid loaded. Tools like Shodan, Censys, or Nmap with HTTP banner grabbing can identify candidate targets.
  2. Verify SSI and mod_cgid: Confirm that the target serves .shtml pages or has SSI enabled via Options +Includes and that mod_cgid (not mod_cgi) is active in the server configuration.
  3. Craft malicious query string: Construct an HTTP request with a query string containing shell metacharacters or commands (e.g., ?cmd=id or ?;id). The shell-escaped query string will be passed to the #exec cmd SSI directive.
  4. Send request to SSI page: Submit the crafted request to an SSI-enabled page that uses <!--#exec cmd="..." --> directives, causing the server to execute the injected command via mod_cgid.
  5. Achieve code execution: The injected command runs with the privileges of the web server process (e.g., www-data or apache), enabling data exfiltration, reverse shell establishment, or further lateral movement (Apache Advisory, Feedly).

Indicators of compromise

  • Network: Unusual HTTP GET/POST requests to .shtml pages with shell metacharacters or command strings in query parameters (e.g., ?;id, ?cmd=whoami, URL-encoded shell operators).
  • Logs: Apache access logs showing requests to SSI-enabled pages with suspicious query strings; error logs showing unexpected command execution output or shell errors from mod_cgid.
  • Process: Unexpected child processes spawned by the Apache httpd or cgid process (e.g., /bin/sh, curl, wget, nc, python) visible via ps or process monitoring tools.
  • File System: New or modified files in web-accessible directories created by the web server user; unexpected cron jobs or scripts added under the Apache service account's home or temp directories.

Mitigation and workarounds

The primary remediation is to upgrade Apache HTTP Server to version 2.4.66 or later, which resolves this issue (Apache Advisory). As interim workarounds: (1) disable Server Side Includes (SSI) if not required by removing Options +Includes from the configuration; (2) disable or remove mod_cgid if CGI daemon functionality is not needed; (3) restrict access to SSI-enabled pages to trusted, authenticated users only. Downstream vendors including Red Hat, Debian, Ubuntu, Oracle, Apple, IBM, Fedora, AlmaLinux, Rocky Linux, and SUSE have released updated packages incorporating the fix (Red Hat, Ubuntu, Apple macOS Sequoia, Oracle CPU Jan 2026).

Community reactions

The vulnerability was disclosed via the Apache security mailing list and oss-security in December 2025, generating moderate community attention. Security news outlets such as SecurityOnline.info and RedHotCyber covered the Apache HTTP Server 2.4.66 release, highlighting this and related CVEs. Multiple Linux distribution security teams (Red Hat, Debian, Ubuntu, SUSE, Fedora, AlmaLinux) responded promptly with updated packages. A GitHub PoC repository was observed being actively developed shortly after disclosure, drawing attention from the security research community (oss-security, SecurityOnline, GitHub PoC).

Additional resources


SourceThis report was generated using AI

Related Apache HTTP Server vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-44631CRITICAL9.8
  • Apache HTTP Server logoApache HTTP Server
  • apache2-manual
NoYesJun 08, 2026
CVE-2026-49975HIGH7.5
  • NGINX logoNGINX
  • httpd:2.4::httpd
NoYesJun 08, 2026
CVE-2026-48913HIGH7.3
  • Apache HTTP Server logoApache HTTP Server
  • apache2-tls13
NoYesJun 08, 2026
CVE-2026-44186HIGH7.3
  • Apache HTTP Server logoApache HTTP Server
  • httpd-debugsource
NoYesJun 08, 2026
CVE-2026-44185HIGH7.3
  • Apache HTTP Server logoApache HTTP Server
  • mod_proxy_html-debuginfo
NoYesJun 08, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management