Description
The default servlet (org.apache.catalina.servlets.DefaultServlet) in Tomcat 4.0.4 and 4.1.10 and earlier allows remote attackers to read source code for server files via a direct request to the servlet.
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 3.0 | tomcat4 | 4.0.3-3woody1 | DSA-170 |
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
- Apache Tomcat 3/4 - 'DefaultServlet' File Disclosure EDB-21853 · remote · Sep 24, 2002 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Maven | org.apache.tomcat:tomcat | >= 4.0.0, < 4.0.5 | 4.0.5 | GHSA-jxcv-v856-j5vg |
| Maven | org.apache.tomcat:tomcat | >= 4.1.0, < 4.1.12 | 4.1.12 | GHSA-jxcv-v856-j5vg |
Advisories 1
- DSA-170 tomcat4 - source code disclosure Debian Security (DSA / DLA) · Mar 9, 2026
References
- DSA-170 vendor-advisory
- 5786 vdb-entry
- RHSA-2002:217 vendor-advisory
- tomcat-servlet-source-code(10175) vdb-entry
- HPSBUX0212-229 vendor-advisory
- RHSA-2002:218 vendor-advisory
- 20020924 JSP source code exposure in Tomcat 4.x mailing-list
- [tomcat-dev] 20190319 svn commit: r1855831 [21/30] - in /tomcat/site/trunk: ./ docs/ xdocs/ mailing-list
- [tomcat-dev] 20190325 svn commit: r1856174 [19/29] - in /tomcat/site/trunk: docs/ xdocs/ xdocs/stylesheets/ mailing-list
- [tomcat-dev] 20200213 svn commit: r1873980 [24/34] - /tomcat/site/trunk/docs/ mailing-list