Description
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.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | file | 4.20-1 | — |
| Debian 13 | file | 4.20-1 | — |
| Debian 12 | file | 4.20-1 | — |
| Debian 4.0 | file | 4.17-5etch1 | DSA-1274-1 |
| Debian 3.1 | file | 4.12-1sarge1 | DSA-1274-1 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 5 | file | 4.17-9.el5 | RHSA-2007:0124 |
| RHEL 4 | file | 4.10-3.EL4.5 | RHSA-2007:0124 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | file | 5.40-1.14 | openSUSE-SU-2024:10755-1 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Exploit-DB 1
- File(1) 4.13 - Command File_PrintF Integer Underflow EDB-29753 · remote · Mar 19, 2007 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 3
- RHSA-2007:0124 Red Hat Security Advisory: file security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- DSA-1274-1 file - buffer overflow Debian Security (DSA / DLA) · Mar 9, 2026
- openSUSE-SU-2024:10755-1 file-5.40-1.14 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
References
- 27314 third-party-advisory
- http://docs.info.apple.com/article.html?artnum=305530
- 25393 third-party-advisory
- 29179 third-party-advisory
- ADV-2007-1939 vdb-entry
- 23021 vdb-entry
- 24616 third-party-advisory
- 1017796 vdb-entry
- [4.0] 20070709 015: SECURITY FIX: July 9, 2007 vendor-advisory
- 27307 third-party-advisory
- [file] 20070302 file-4.20 is now available mailing-list
- MDKSA-2007:067 vendor-advisory
- 20070828 Re: OpenBSD 4.1 - Heap overflow vulnerabillity mailing-list
- SUSE-SR:2007:005 vendor-advisory
- 24723 third-party-advisory
- 24754 third-party-advisory
- APPLE-SA-2007-05-24 vendor-advisory
- 25402 third-party-advisory
- RHSA-2007:0124 vendor-advisory
- https://bugs.gentoo.org/show_bug.cgi?id=171452
- 25989 third-party-advisory
- 24604 third-party-advisory
- oval:org.mitre.oval:def:10658 vdb-entry signature
- SUSE-SA:2007:040 vendor-advisory
- 25931 third-party-advisory
- DSA-1274 vendor-advisory
- 24617 third-party-advisory
- openbsd-file-bo(36283) vdb-entry
- ADV-2007-1040 vdb-entry
- http://support.avaya.com/elmodocs2/security/ASA-2007-179.htm
- 25133 third-party-advisory
- FreeBSD-SA-07:04 vendor-advisory
- USN-439-1 vendor-advisory
- VU#606700 third-party-advisory
- 24608 third-party-advisory
- 20070825 OpenBSD 4.1 - Heap overflow vulnerabillity mailing-list
- GLSA-200703-26 vendor-advisory
- GLSA-200710-19 vendor-advisory
- 24548 third-party-advisory
- 24592 third-party-advisory
- https://issues.rpath.com/browse/RPL-1148
- SSA:2007-093-01 vendor-advisory