CVE-2003-0102: Buffer overflow in tryelf() in readelf.c of the file command allows attackers to execute arbitrary code as the
CVE-2003-0102 is a medium-severity flaw (CVSS 4.6) affecting file, netbsd. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
Buffer overflow in tryelf() in readelf.c of the file command allows attackers to execute arbitrary code as the user running file, possibly via a large entity size value in an ELF header (elfhdr.e_shentsize).
Why this priority
- Public exploit reference
No fix is published yet: follow the downgrade or mitigation steps.
Risk facts
| CVSS score | 4.6 (Medium) |
| EPSS exploit chance | 2.0% (top 19%) |
| CISA exploited list | No |
| Published | 2003-03-18 |
| Last modified | 2026-06-16 |
Last updated 2026-06-16 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Public exploits and detection
Public code exists for this CVE. Treat unpatched systems as at risk, and only run PoCs in a lab.
- Exploit-DB: File 3.x - Local Stack Overflow Code Execution (1)
- Exploit-DB: File 3.x - Local Stack Overflow Code Execution (2)
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2003-0102?
file: downgrade or apply the listed mitigation; netbsd: mitigate or apply the listed mitigation. Exact commands for each OS are on this page.
Is CVE-2003-0102 being exploited?
CVE-2003-0102 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2003-0102 affect?
CVE-2003-0102 affects file, netbsd. Severity is medium (CVSS 4.6). Buffer overflow in tryelf() in readelf.c of the file command allows attackers to execute arbitrary code as the user running file, possibly via a large entity size value in an ELF header (elfhdr.e_shentsize).
How urgent is CVE-2003-0102?
Priority 41/100. Public exploit reference
Related CVEs
- CVE-2019-8906 MEDIUM 4.4 DOWNGRADE MITIGATE do_core_note in readelf.c in libmagic.a in file 5.35 has an out-of-bounds read because memcpy is misused.
- CVE-2022-48554 MEDIUM 5.5 DOWNGRADE MITIGATE File before 5.43 has an stack-based buffer over-read in file_copystr in funcs.c
- CVE-2019-8907 HIGH 8.8 DOWNGRADE MITIGATE do_core_note in readelf.c in libmagic.a in file 5.35 allows remote attackers to cause a denial of service (sta
- CVE-2019-8905 MEDIUM 4.4 MITIGATE DOWNGRADE do_core_note in readelf.c in libmagic.a in file 5.35 has a stack-based buffer over-read, related to file_print
- CVE-2019-8904 HIGH 8.8 DOWNGRADE MITIGATE do_bid_note in readelf.c in libmagic.a in file 5.35 has a stack-based buffer over-read, related to file_printf