{"schemaVersion":3,"id":"CVE-2004-0940","aliases":["DSA-594-1"],"status":"published","duplicateOf":null,"title":null,"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.","dates":{"published":"2004-10-26T04:00:00.000Z","modified":"2024-08-08T00:31:48.244Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":7.8,"severity":"high","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":7.8,"severity":"high","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false},{"version":"2.0","versionLabel":"v2.0","source":"NVD","score":6.9,"severity":"medium","vector":"AV:L/AC:M/Au:N/C:C/I:C/A:C","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.0483,"percentile":0.91882,"severity":"low","asOf":"2026-10-18T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-18T00:00:00.000Z","baselineScore":0.0483},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.0483,"percentile":0.91882}],"last30":[{"date":"2026-09-18T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.0483,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.0483,"percentile":0.91882}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[{"id":"REF_6B6C8D37C3402F28","name":"Exploit Reference (securityfocus.com)","source":"reference","url":"http://www.securityfocus.com/bid/11471","maturity":"unknown","reliabilityScore":0.2,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null},{"id":"587","name":"Apache 1.3.31 mod_include - Local Buffer Overflow","source":"exploit-database","url":"https://www.exploit-db.com/exploits/587","maturity":"weaponized","reliabilityScore":0.8,"verified":true,"type":"local","platforms":["linux"],"requiresAuth":null,"exploitdb":{"verified":true,"type":"local","platform":"linux","file":"exploits/linux/local/587.c","codes":["OSVDB-11003","CVE-2004-0940"]},"metasploit":null},{"id":"24694","name":"Apache 1.3.x mod_include - Local Buffer Overflow","source":"exploit-database","url":"https://www.exploit-db.com/exploits/24694","maturity":"weaponized","reliabilityScore":0.8,"verified":true,"type":"local","platforms":["linux"],"requiresAuth":null,"exploitdb":{"verified":true,"type":"local","platform":"linux","file":"exploits/linux/local/24694.c","codes":["CVE-2004-0940","OSVDB-12881"]},"metasploit":null}],"exploitCount":3,"weaknesses":[{"id":"CWE-131","name":"Incorrect Calculation of Buffer Size","description":"The product does not correctly calculate the size to be used when allocating a buffer, which could lead to a buffer overflow.","type":"weakness","status":"Draft","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/131.html"}],"affected":[{"vendor":"apache","product":"http_server","name":"http server","label":"http_server","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 1.3, ≤ 1.3.32","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 1.3, ≤ 1.3.32","eol":{"isEol":null,"eolDate":null,"matchMethod":"cpe","cycle":null,"product":{"name":"apache-http-server","label":"Apache HTTP Server","category":"server-app"}},"hubHref":"/vendor/apache/http_server"},{"vendor":"debian","product":"apache","name":"apache","label":"apache","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/apache","purlType":"deb","versions":[{"text":"< 1.3.26-0woody6","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.3.26-0woody6","eol":null,"hubHref":null},{"vendor":"hp","product":"hp-ux","name":"hp-ux","label":"hp-ux","ecosystem":null,"cpePart":"o","purl":null,"purlType":null,"versions":[{"text":"11.00","noFixRecorded":false,"fixedIn":null},{"text":"11.11","noFixRecorded":false,"fixedIn":null},{"text":"11.20","noFixRecorded":false,"fixedIn":null},{"text":"11.22","noFixRecorded":false,"fixedIn":null}],"versionsText":"11.00 | 11.11 | 11.20 | 11.22","eol":null,"hubHref":"/vendor/hp/hp-ux"},{"vendor":"openpkg","product":"openpkg","name":"openpkg","label":"openpkg","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"2.0","noFixRecorded":false,"fixedIn":null},{"text":"2.1","noFixRecorded":false,"fixedIn":null},{"text":"2.2","noFixRecorded":false,"fixedIn":null}],"versionsText":"2.0 | 2.1 | 2.2","eol":null,"hubHref":"/vendor/openpkg/openpkg"},{"vendor":"slackware","product":"slackware_linux","name":"slackware linux","label":"slackware_linux","ecosystem":null,"cpePart":"o","purl":null,"purlType":null,"versions":[{"text":"8.0","noFixRecorded":false,"fixedIn":null},{"text":"8.1","noFixRecorded":false,"fixedIn":null},{"text":"9.0","noFixRecorded":false,"fixedIn":null},{"text":"9.1","noFixRecorded":false,"fixedIn":null},{"text":"10.0","noFixRecorded":false,"fixedIn":null},{"text":"current","noFixRecorded":false,"fixedIn":null}],"versionsText":"8.0 | 8.1 | 9.0 | 9.1 | 10.0 | current","eol":{"isEol":true,"eolDate":"2003-03-29T00:00:00.000Z","matchMethod":"cpe","cycle":{"name":"8.0","label":"8.0","eolFrom":"2003-03-29T00:00:00.000Z","isLts":false,"isMaintained":false,"latestVersion":null},"product":{"name":"slackware","label":"Slackware Linux","category":"os"}},"hubHref":"/vendor/slackware/slackware_linux"},{"vendor":"suse","product":"suse_linux","name":"suse linux","label":"suse_linux","ecosystem":null,"cpePart":"o","purl":null,"purlType":null,"versions":[{"text":"8.0","noFixRecorded":false,"fixedIn":null},{"text":"8.1","noFixRecorded":false,"fixedIn":null},{"text":"8.2","noFixRecorded":false,"fixedIn":null},{"text":"9.0","noFixRecorded":false,"fixedIn":null},{"text":"9.1","noFixRecorded":false,"fixedIn":null},{"text":"9.2","noFixRecorded":false,"fixedIn":null}],"versionsText":"8.0 | 8.1 | 8.2 | 9.0 | 9.1 | 9.2","eol":null,"hubHref":"/vendor/suse/suse_linux"},{"vendor":"trustix","product":"secure_linux","name":"secure linux","label":"secure_linux","ecosystem":null,"cpePart":"o","purl":null,"purlType":null,"versions":[{"text":"1.5","noFixRecorded":false,"fixedIn":null}],"versionsText":"1.5","eol":null,"hubHref":"/vendor/trustix/secure_linux"}],"affectedCount":7,"eol":{"hasEol":true,"count":1},"references":[{"url":"http://marc.info/?l=bugtraq&m=109906660225051&w=2","label":"marc.info?l=bugtraq&m=109906660225051&w=2","hostname":"marc.info","tags":["Vendor Advisory","X Refsource OPENPKG","Mailing List","Third Party Advisory"]},{"url":"http://www.apacheweek.com/features/security-13","label":"www.apacheweek.com/features/security-13","hostname":"www.apacheweek.com","tags":["X Refsource CONFIRM","Product"]},{"url":"http://support.avaya.com/elmodocs2/security/ASA-2006-081.htm","label":"support.avaya.com/elmodocs2/security/ASA-2006-081.htm","hostname":"support.avaya.com","tags":["X Refsource CONFIRM","Third Party Advisory"]},{"url":"http://www.mandriva.com/security/advisories?name=MDKSA-2004:134","label":"www.mandriva.com/security/advisories?name=MDKSA-2004:134","hostname":"www.mandriva.com","tags":["Vendor Advisory","X Refsource MANDRAKE","Third Party Advisory"]},{"url":"https://exchange.xforce.ibmcloud.com/vulnerabilities/17785","label":"exchange.xforce.ibmcloud.com/vulnerabilities/17785","hostname":"exchange.xforce.ibmcloud.com","tags":["VDB Entry","X Refsource XF","Third Party Advisory"]},{"url":"http://www.securityfocus.com/bid/11471","label":"www.securityfocus.com/bid/11471","hostname":"www.securityfocus.com","tags":["VDB Entry","X Refsource BID","Broken Link","Exploit","Patch","Third Party Advisory","Vendor Advisory"]},{"url":"http://www.redhat.com/support/errata/RHSA-2005-816.html","label":"www.redhat.com/support/errata/RHSA-2005-816.html","hostname":"www.redhat.com","tags":["Vendor Advisory","X Refsource REDHAT","Broken Link"]},{"url":"http://secunia.com/advisories/12898/","label":"secunia.com/advisories/12898/","hostname":"secunia.com","tags":["Third Party Advisory","X Refsource SECUNIA","Broken Link"]},{"url":"http://www.debian.org/security/2004/dsa-594","label":"www.debian.org/security/2004/dsa-594","hostname":"www.debian.org","tags":["Vendor Advisory","X Refsource DEBIAN","Mailing List","Third Party Advisory"]},{"url":"http://secunia.com/advisories/19073","label":"secunia.com/advisories/19073","hostname":"secunia.com","tags":["Third Party Advisory","X Refsource SECUNIA","Broken Link"]},{"url":"http://securitytracker.com/id?1011783","label":"securitytracker.com/id?1011783","hostname":"securitytracker.com","tags":["VDB Entry","X Refsource SECTRACK","Broken Link","Third Party Advisory"]},{"url":"http://www.redhat.com/support/errata/RHSA-2004-600.html","label":"www.redhat.com/support/errata/RHSA-2004-600.html","hostname":"www.redhat.com","tags":["Vendor Advisory","X Refsource REDHAT","Broken Link"]},{"url":"http://sunsolve.sun.com/search/document.do?assetkey=1-26-102197-1","label":"sunsolve.sun.com/search/document.do?assetkey=1-26-102197-1","hostname":"sunsolve.sun.com","tags":["Vendor Advisory","X Refsource SUNALERT","Broken Link"]},{"url":"http://www.vupen.com/english/advisories/2006/0789","label":"www.vupen.com/english/advisories/2006/0789","hostname":"www.vupen.com","tags":["VDB Entry","X Refsource VUPEN","Broken Link"]},{"url":"https://lists.apache.org/thread.html/rf6449464fd8b7437704c55f88361b66f12d5b5f90bcce66af4be4ba9%40%3Ccvs.httpd.apache.org%3E","label":"lists.apache.org/thread.html/…","hostname":"lists.apache.org","tags":["Mailing List","X Refsource MLIST","Patch"]},{"url":"https://lists.apache.org/thread.html/re895fc1736d25c8cf57e102c871613b8aeec9ea26fd8a44e7942b5ab%40%3Ccvs.httpd.apache.org%3E","label":"lists.apache.org/thread.html/…","hostname":"lists.apache.org","tags":["Mailing List","X Refsource MLIST","Patch"]},{"url":"https://lists.apache.org/thread.html/r5419c9ba0951ef73a655362403d12bb8d10fab38274deb3f005816f5%40%3Ccvs.httpd.apache.org%3E","label":"lists.apache.org/thread.html/…","hostname":"lists.apache.org","tags":["Mailing List","X Refsource MLIST","Patch"]},{"url":"https://lists.apache.org/thread.html/rd65d8ba68ba17e7deedafbf5bb4899f2ae4dad781d21b931c2941ac3%40%3Ccvs.httpd.apache.org%3E","label":"lists.apache.org/thread.html/…","hostname":"lists.apache.org","tags":["Mailing List","X Refsource MLIST","Patch"]},{"url":"https://lists.apache.org/thread.html/r734a07156abf332d5ab27fb91d9d962cacfef4f3681e44056f064fa8%40%3Ccvs.httpd.apache.org%3E","label":"lists.apache.org/thread.html/…","hostname":"lists.apache.org","tags":["Mailing List","X Refsource MLIST","Patch"]},{"url":"https://lists.apache.org/thread.html/r9f93cf6dde308d42a9c807784e8102600d0397f5f834890708bf6920%40%3Ccvs.httpd.apache.org%3E","label":"lists.apache.org/thread.html/…","hostname":"lists.apache.org","tags":["Mailing List","X Refsource MLIST","Patch"]},{"url":"https://lists.apache.org/thread.html/rf2f0f3611f937cf6cfb3b4fe4a67f69885855126110e1e3f2fb2728e%40%3Ccvs.httpd.apache.org%3E","label":"lists.apache.org/thread.html/…","hostname":"lists.apache.org","tags":["Mailing List","X Refsource MLIST","Patch"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2004-10-26T04:00:00.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2024-08-08T00:31:48.244Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":42,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-19T08:16:10.024Z","stale":false,"partial":false}}