CVE-2004-0940 Memory corruption in n/a

High 7.8 Published Updated

Local attackers can execute arbitrary code as the Apache user via crafted SSI documents due to a buffer overflow in mod_include.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2004-0940?

CVE-2004-0940 is a high-severity memory corruption vulnerability in Apache Http Server, published on 26 Oct 2004. It can only be exploited from the same machine or local network, with no action from the victim.

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.

Weakness: CWE-131

Which versions are affected by CVE-2004-0940?

It affects 6 products.

Products include Apache Http Server, Hp Hp-Ux, Openpkg Openpkg, Slackware Slackware Linux, Suse Suse Linux, Trustix Secure Linux.

How do I fix CVE-2004-0940?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2004-0940 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2004-0940 exists.

Public exploit code: 2 Exploit-DB entries.

All Apache Http Server vulnerabilities

Sources

Also known as DSA-594-1, GHSA-cx2h-jfxr-vw9c.

Is CVE-2004-0940 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free