Skip to main content
Mallory
HighPublic exploitVulnerability

CVE-2004-0940: Apache HTTP Server mod_include SSI Buffer Overflow

Published Oct 26, 2004 · Updated 1 month ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS7.8High · v3.1
EPSS4.8%92nd percentile
CISA KEVNoNot listed
In the wildNonePublic exploit, no exploitation reported
Vendors
Apache Software FoundationHewlett Packard EnterpriseOpenpkgTrustixSlackwareSuse
IdentifiersCVE-2004-0940CWE-131 · Incorrect Calculation of Buffer Size

CVE-2004-0940 is a buffer overflow in the mod_include get_tag function in Apache HTTP Server 1.3.x through 1.3.32. An accidental double increment of a counter causes a length-check condition to fail to terminate the relevant parsing loop, resulting in an incorrect length calculation while processing SSI (XSSI) document content. The resulting out-of-bounds write can be used by a local user able to create SSI documents to execute arbitrary code in the web-server process context.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation enables arbitrary code execution with the privileges of the Apache HTTP Server service account. Exploitation may also crash or otherwise disrupt the affected web-server process, causing denial of service.

Mitigation

If you can’t patch tonight, do this now.

Disable mod_include where SSI processing is not required. Where it must remain enabled, restrict creation and modification of SSI documents to trusted administrators, prevent untrusted users from supplying SSI content, and monitor for anomalous SSI document activity.

Remediation

Patch, then assume compromise.

Upgrade affected Apache HTTP Server installations to a release that contains the mod_include fix. For affected F5 BIG-IP and 3-DNS products, upgrade to BIG-IP 4.5.12, 4.6.3, or later.

Public exploits

Exploits

No validated public exploits yet. Hidden: 2 not yet analyzed, such as Exploit-DB entries.

View more in app →
Candidate exploits are awaiting analysis. View them in Mallory.
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Apache Software FoundationApache HTTP Serverapplication
Hewlett Packard EnterpriseHp-Uxoperating_system
OpenpkgOpenpkgapplication
SlackwareSlackware Linuxoperating_system
SuseSuse Linuxoperating_system
TrustixSecure Linuxoperating_system
FAQ

Frequently asked questions

Is CVE-2004-0940 exploited in the wild?
As of Oct 16, 2026, Mallory has no reports of CVE-2004-0940 being exploited in the wild. It is not listed in CISA KEV.
Is there a public exploit for CVE-2004-0940?
Yes. As of Oct 16, 2026, Mallory has reports of a public exploit for CVE-2004-0940.
Is there a patch for CVE-2004-0940?
Upgrade affected Apache HTTP Server installations to a release that contains the mod_include fix. For affected F5 BIG-IP and 3-DNS products, upgrade to BIG-IP 4.5.12, 4.6.3, or later.
What products are affected by CVE-2004-0940?
Apache Software Foundation Apache HTTP Server, Hewlett Packard Enterprise Hp-Ux, Openpkg, Trustix Secure Linux, Slackware Linux, and 1 more.
How severe is CVE-2004-0940?
CVE-2004-0940 has a CVSS v3.1 score of 7.8 (High) and an EPSS score of 4.8% (92nd percentile) as of Oct 16, 2026.
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activityCommunity discussion across Reddit, Mastodon, and other social sources.