CVE-2004-1304 in File and 2 more products
Stack-based buffer overflow in the ELF header parsing code in file before 4.12 allows attackers to execute arbitrary code via a crafted ELF file.
Affects 3 products from 3 vendors. Facts below cite their sources.
Remotely exploitable over the network, low complexity.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| File | File | 4.0 4.1 4.2 4.3 4.4 4.5+6 more4.6 4.7 4.8 4.9 4.10 4.11 |
| Gentoo | Linux | All versions |
| Trustix | Secure Linux | 2.0 2.1 2.2 |
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
Stack-based buffer overflow in the ELF header parsing code in file before 4.12 allows attackers to execute arbitrary code via a crafted ELF file.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2004-1304 |
|---|---|
| BreachSpider ID | BS-2005-GLOBAL-335753-C |
| CVSS vector | AV:N/AC:L/Au:N/C:C/I:C/A:C |
| Published | 2005-01-10 |
| Last modified | 2026-04-16 |
| Source | NVD |
Analysis AI-written, not human-reviewed
A stack-based buffer overflow vulnerability in the ELF header parsing code of the file utility before version 4.12 allows attackers to execute arbitrary code by providing a specially crafted ELF file.
The vulnerability occurs during the parsing of the ELF header in the file utility. An attacker can exploit this by crafting an ELF file with a maliciously constructed header that triggers the buffer overflow, leading to arbitrary code execution.
Questions
What is CVE-2004-1304?
A stack-based buffer overflow vulnerability in the ELF header parsing code of the file utility before version 4.12 allows attackers to execute arbitrary code by providing a specially crafted ELF file.
What is the CVSS score for CVE-2004-1304?
CVE-2004-1304 has CVSS 10.0 (Critical). Vector: AV:N/AC:L/Au:N/C:C/I:C/A:C. EPSS: 11.4%.
Is CVE-2004-1304 actively exploited?
Public exploit available for CVE-2004-1304. Exploitation risk elevated.
How do I remediate CVE-2004-1304?
Priority: IMMEDIATE. PSIRT: [email protected]
What systems are affected by CVE-2004-1304?
CVE-2004-1304 affects File File; Gentoo 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":"File","product":"File","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.