Integer underflow in the file_printf function in the "file" program before 4.20 allows user-assisted attackers to execute arbitrary code via
Integer underflow in the file_printf function in the "file" program before 4.20 allows user-assisted attackers to execute arbitrary code via a file that triggers a heap-based buffer overflow.
- Published
- Mar 20, 2007
- Updated
- Jun 16, 2026
- EPSS
- 13.5% · 96th percentile
- CWE
- CWE-189
Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.
Report tools
Action score
41
Plan
Add it to your regular patch cycle.
- CVSS
- 37 / 40 · 9.3 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 4 / 30 · 13.5%
Affected systems
| Vendor | Product | CPE |
|---|---|---|
| file | file | cpe:2.3:a:file:file |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- file fileup to 4.19 inclusive
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Debian:12 | file | before 4.20-1 | 4.20-1 |
| Debian:3.1 | file | before 4.12-1sarge1 | 4.12-1sarge1 |
| Debian:4.0 | file | before 4.17-5etch1 | 4.17-5etch1 |
| openSUSE:Tumbleweed | file | before 5.40-1.14 | 5.40-1.14 |
| Red Hat:enterprise_linux:4::as | file | before 0:4.10-3.EL4.5 | 0:4.10-3.EL4.5 |
| Red Hat:enterprise_linux:4::as | file-debuginfo | before 0:4.10-3.EL4.5 | 0:4.10-3.EL4.5 |
| Red Hat:enterprise_linux:5::client | file | before 0:4.17-9.el5 | 0:4.17-9.el5 |
| Red Hat:enterprise_linux:5::client | file-debuginfo | before 0:4.17-9.el5 | 0:4.17-9.el5 |
Same product
file: all recordsOther highest-scoring records for the same primary product.
- CVE-2004-1304Stack-based buffer overflow in the ELF header parsing code in file before 4.12 allows attackers to execute arbitrary code via a crafted ELF 43Plan
- CVE-2007-2799Integer overflow in the "file" program 4.20, when running on 32-bit systems, as used in products including The Sleuth Kit, might allow user-21Monitor
- CVE-2003-0102Buffer overflow in tryelf() in readelf.c of the file command allows attackers to execute arbitrary code as the user running file, possibly v19Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| debian:file | 4.20-1 · Debian:12 | Package registry (OSV) |
| opensuse:file | 5.40-1.14 · openSUSE:Tumbleweed | Package registry (OSV) |
| red hat:file | 0:4.10-3.EL4.5 · Red Hat:enterprise_linux:4::as | Package registry (OSV) |
| red hat:file-debuginfo | 0:4.10-3.EL4.5 · Red Hat:enterprise_linux:4::as | Package registry (OSV) |
Exploit status
Proof of concept available
A public proof of concept or detection signature exists. Exploit knowledge is out there; don't delay patching.
Evidence
- Exploit-DB entry ×1
Noroxi does not host or link to exploit code. Metasploit module names and Nuclei template ids are shown (names, not code); Exploit-DB entries and PoC repositories are given as counts only.
| Source | Kind | Date |
|---|---|---|
| Exploit-DB entry | remote | 2007-03-19 |
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
- First PoC-2 d
- Published
- TodaySep 30, 2026+7134 d
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
No commit or PR link among the references.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
If successful
- Confidentiality
- C · data can be read
- Integrity
- C · data or configuration can be modified
- Availability
- C · the service can be disrupted
- Attack complexity
- M
- Confidentiality impact
- C
- Integrity impact
- C
- Availability impact
- C
Weakness class (CWE)
CWE-189 · Numeric ErrorsCVSS vector
AV:N/AC:M/Au:N/C:C/I:C/A:C
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
MITRE has no CAPEC/ATT&CK mapping for this CWE.
Noroxi analysis
No Noroxi analysis for this record yet
We don't hand-write analysis for all 385,000+ vulnerabilities; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.
We use this product, ask for helpChange log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
- ftp://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2008-001.txt.asc
- docs.info.apple.com/article.html?artnum=305530
- lists.apple.com/archives/security-announce/2007/May/msg00004.html
- mx.gw.com/pipermail/file/2007/000161.html
- openbsd.org/errata40.html#015_file
- secunia.com/advisories/24548
- secunia.com/advisories/24592
- secunia.com/advisories/24604
- secunia.com/advisories/24608
- secunia.com/advisories/24616
- secunia.com/advisories/24617
- secunia.com/advisories/24723
- secunia.com/advisories/24754
- secunia.com/advisories/25133
- secunia.com/advisories/25393
- secunia.com/advisories/25402
- secunia.com/advisories/25931
- secunia.com/advisories/25989
- secunia.com/advisories/27307
- secunia.com/advisories/27314
Vendor advisories and official records. Exploit/PoC links are deliberately left out.