|
| 1 | +# Security Policy |
| 2 | + |
| 3 | +## Before You Report - Required Self-Check |
| 4 | + |
| 5 | +**Complete this checklist. If you answer "No" to any question, do not submit a report:** |
| 6 | + |
| 7 | +- [ ] I have read the [Tomcat Security Model](https://tomcat.apache.org/security-model.html) and my finding doesn't require access to config files, binaries, or admin interfaces |
| 8 | +- [ ] I have written a working Tomcat JUnit test case that compiles, runs, and demonstrates the vulnerability, or I have provided a justification as to why a JUnit test case cannot be written for this report and I have provided a minimal proof of concept |
| 9 | +- [ ] I have tested against a real Tomcat instance - this is not theoretical analysis or scanner output |
| 10 | +- [ ] I am submitting in plain text (no PDFs, archives, videos, or formatted documents) |
| 11 | + |
| 12 | +**If you cannot check all boxes, your report will be rejected.** |
| 13 | + |
| 14 | +## Where to Report |
| 15 | + |
| 16 | +**security@tomcat.apache.org** - Exclusively for undisclosed security vulnerabilities in Tomcat |
| 17 | + |
| 18 | +**Not for:** Bug reports ([Bugzilla](https://bz.apache.org/bugzilla/)), configuration help ([users list](https://tomcat.apache.org/lists.html)), theoretical issues, scanner output, or application vulnerabilities. |
| 19 | + |
| 20 | +## Common Invalid Reports - Do Not Send |
| 21 | + |
| 22 | +These will be **rejected without response**: |
| 23 | + |
| 24 | +- "Tomcat allows deploying WAR files that execute code" - Web apps are trusted, this is normal |
| 25 | +- "I can modify server.xml to change behavior" - Config files are trusted |
| 26 | +- "Sending lots of data crashes Tomcat" - Generic DoS without non-linear consumption |
| 27 | +- "XSS/SQLi in my deployed application" - Your app's bug, not Tomcat's |
| 28 | +- "Manager app accessible with valid password" - Admin users are trusted |
| 29 | +- Scanner reports without actual testing - Must verify manually with working PoC |
| 30 | +- Theoretical vulnerabilities or AI-generated reports - Must include working test case |
| 31 | + |
| 32 | +**Review the [security model](https://tomcat.apache.org/security-model.html) to understand what qualifies as a Tomcat vulnerability.** |
| 33 | + |
| 34 | +## Required: Working Test Case |
| 35 | + |
| 36 | +**Every report MUST include a complete Tomcat JUnit test case that:** |
| 37 | +- Extends `TomcatBaseTest` or appropriate test base class |
| 38 | +- Compiles against Tomcat source without errors |
| 39 | +- Runs via `ant test` and demonstrates the vulnerability |
| 40 | +- Uses real Tomcat APIs (not pseudo-code) |
| 41 | +- Includes comments explaining the attack and impact |
| 42 | + |
| 43 | +**The test must actually work - we will run it. If it doesn't compile or doesn't reproduce the issue, your report will be rejected.** |
| 44 | + |
| 45 | +**Exception:** If a JUnit test case cannot be written for your report, you must provide a clear justification explaining why a test case is not possible, along with a minimal proof of concept that demonstrates the vulnerability. |
| 46 | + |
| 47 | +### Example Structure |
| 48 | + |
| 49 | +```java |
| 50 | +package org.apache.catalina.security; |
| 51 | + |
| 52 | +import org.junit.Assert; |
| 53 | +import org.junit.Test; |
| 54 | +import org.apache.catalina.startup.TomcatBaseTest; |
| 55 | +import org.apache.catalina.startup.Tomcat; |
| 56 | +import org.apache.catalina.Context; |
| 57 | +import org.apache.tomcat.util.buf.ByteChunk; |
| 58 | + |
| 59 | +/** |
| 60 | + * Demonstrates [specific vulnerability]. |
| 61 | + * Attack: [how it works] |
| 62 | + * Impact: [security consequence] |
| 63 | + */ |
| 64 | +public class TestSecurityIssueXXXXX extends TomcatBaseTest { |
| 65 | + |
| 66 | + @Test |
| 67 | + public void testVulnerabilityName() throws Exception { |
| 68 | + // Setup: Configure Tomcat to expose the vulnerability |
| 69 | + Tomcat tomcat = getTomcatInstance(); |
| 70 | + Context ctx = tomcat.addContext("", null); |
| 71 | + Tomcat.addServlet(ctx, "test", new YourTestServlet()); |
| 72 | + ctx.addServletMappingDecoded("/test", "test"); |
| 73 | + tomcat.start(); |
| 74 | + |
| 75 | + // Attack: Send malicious request |
| 76 | + ByteChunk response = new ByteChunk(); |
| 77 | + int rc = getUrl("http://localhost:" + getPort() + "/test?malicious=payload", |
| 78 | + response, null); |
| 79 | + |
| 80 | + // Verify: Demonstrate security impact |
| 81 | + Assert.assertNotEquals("Should reject malicious input", 200, rc); |
| 82 | + // Or: Assert.assertFalse("Response leaked sensitive data", |
| 83 | + // response.toString().contains("secret")); |
| 84 | + } |
| 85 | +} |
| 86 | +``` |
| 87 | + |
| 88 | +## Required Report Information |
| 89 | + |
| 90 | +Include all of the following: |
| 91 | +1. **Summary** - 1-2 sentences describing the vulnerability |
| 92 | +2. **Tomcat Version** - Exact version tested (e.g., `Apache-Tomcat/11.0.5`) |
| 93 | +3. **Configuration** - Non-default settings needed to reproduce (if any) |
| 94 | +4. **Impact** - Specific consequence (RCE, information disclosure, authentication bypass, etc.) |
| 95 | +5. **Test Case** - Working JUnit test as described above |
| 96 | + |
| 97 | +**Format:** Plain text only (email body or `.txt`/`.java` attachments). No `.zip`, `.pdf`, `.docx`, videos, or screenshots. |
| 98 | + |
| 99 | +## What Happens Next |
| 100 | + |
| 101 | +1. **Acknowledgment** - Usually within a few business days, if the report passes initial screening |
| 102 | +2. **Validation** - We run your test case and assess impact against the security model |
| 103 | +3. **Fix & Disclosure** - If valid, we develop a fix and coordinate public disclosure timing |
| 104 | +4. **Credit** - Valid reports receive acknowledgment in security advisories |
| 105 | + |
| 106 | +Allow reasonable time (typically 90+ days) for fix development. We'll work with you on disclosure timing. |
| 107 | + |
| 108 | +## Security Model Quick Reference |
| 109 | + |
| 110 | +**Trusted (not security bugs):** |
| 111 | +- Administrative users, configuration files, Tomcat binaries (JARs, scripts) |
| 112 | +- Deployed web applications (app bugs are the app's responsibility) |
| 113 | +- Manager/Host Manager access, JMX, debugging interfaces |
| 114 | + |
| 115 | +**Untrusted (potential security bugs):** |
| 116 | +- HTTP/AJP connector data from clients |
| 117 | +- Malicious requests via supported protocols |
| 118 | + |
| 119 | +See the full [security model](https://tomcat.apache.org/security-model.html) for details. |
| 120 | + |
| 121 | +## Published Vulnerabilities & Updates |
| 122 | + |
| 123 | +- **Advisories:** https://tomcat.apache.org/security.html |
| 124 | +- **Announcements:** [Mailing lists](https://tomcat.apache.org/lists.html) |
| 125 | +- **Secure configuration:** https://tomcat.apache.org/tomcat-11.0-doc/security-howto.html |
| 126 | + |
| 127 | +--- |
| 128 | + |
| 129 | +**Thank you for helping keep Apache Tomcat secure through high-quality, actionable vulnerability reports.** |
0 commit comments