CVE-2004-0940 in Apache Http Server and 5 more products
Buffer overflow in the get_tag function in mod_include for Apache 1.3.x to 1.3.32 allows local users who can create SSI documents to execute arbitrary code as the apache user via SSI (XSSI) documents that trigger a length calculation error.
Affects 6 products from 6 vendors. Facts below cite their sources.
Requires local access, low complexity, low privileges required, no user interaction needed, impact contained to the vulnerable component, full confidentiality impact, full integrity impact, full availability impact.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Apache | Http Server | ≥ 1.3, ≤ 1.3.32 |
| Hp | Hp-Ux | 11.00 11.11 11.20 11.22 |
| Openpkg | Openpkg | 2.0 2.1 2.2 |
| Slackware | Slackware Linux | 8.0 8.1 9.0 9.1 10.0 current |
| Suse | Suse Linux | 8.0 8.1 8.2 9.0 9.1 9.2 |
| Trustix | Secure Linux | 1.5 |
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
No official vendor advisory link on record. See the CVE record.
Vendor PSIRT: [email protected]
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Reported · reference |
Official description
Buffer overflow in the get_tag function in mod_include for Apache 1.3.x to 1.3.32 allows local users who can create SSI documents to execute arbitrary code as the apache user via SSI (XSSI) documents that trigger a length calculation error.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2004-0940 |
|---|---|
| BreachSpider ID | BS-2005-GLOBAL-158423-H |
| CVSS vector | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| Published | 2005-02-09 |
| Last modified | 2026-04-16 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-131: CWE-131
Related attack patterns (CAPEC)
CAPEC-47 Buffer Overflow via Parameter Expansion via CWE-131
CAPEC-100 Overflow Buffers via CWE-131
Mapping is CWE to CAPEC per MITRE CAPEC 3.9.
Analysis AI-written, not human-reviewed
A buffer overflow vulnerability in the get_tag function of mod_include in Apache 1.3.x to 1.3.32 allows local users who can create SSI documents to execute arbitrary code as the apache user.
The vulnerability is triggered by SSI (Server Side Includes) documents that cause a length calculation error in the get_tag function, leading to a buffer overflow.
Questions
What is CVE-2004-0940?
A buffer overflow vulnerability in the get_tag function of mod_include in Apache 1.3.x to 1.3.32 allows local users who can create SSI documents to execute arbitrary code as the apache user.
What is the CVSS score for CVE-2004-0940?
CVE-2004-0940 has CVSS 7.8 (High). Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. EPSS: 4.8%.
Is CVE-2004-0940 actively exploited?
Public exploit available for CVE-2004-0940. Exploitation risk elevated.
How do I remediate CVE-2004-0940?
Priority: HIGH. PSIRT: [email protected]
What systems are affected by CVE-2004-0940?
CVE-2004-0940 affects Apache Http Server; Hp Hp-Ux; Openpkg Openpkg; Slackware Slackware Linux; Suse Suse Linux; Trustix Secure Linux.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Apache","product":"Http Server","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-04-16.