Don't confirm Tomcat manager CRITICAL from a generic HTTP 200 - #34
Draft
cursor[bot] wants to merge 1 commit into
Draft
cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
probe_tomcat_default_creds treated any 200 on /manager/html as unauthenticated Tomcat manager (CWE-306). SPA catch-alls and login pages after urllib followed a 3xx pinned a false CRITICAL through fusion. Require Tomcat manager HTML markers, matching service_prober. Co-authored-by: dmitryflynn <dmitryflynn@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug and impact
src/vuln_prober.pyprobe_tomcat_default_credsconfirmed CRITICAL CWE-306 (unauthenticated Tomcat manager / WAR deploy = RCE) wheneverGET /manager/htmlreturned HTTP 200, with no check that the body was actually Tomcat manager.service_prober.check_http_admin_panelsalready requires Tomcat markers for this path. The vuln-prober duplicate did not. Fusion treatssource=probe+ high reliability as un-droppable, so a false CRITICAL is pinned into the report, HackerOne export, and executive summary.Trigger: scan a host with 8080/8000/8443/etc. open (http-alt). Typical cases:
/manager/html/manager/html302s to/loginand urllib follows to a 200 login page (_http_getstill follows 3xx; see open Don't follow HTTP redirects in vuln_prober fetches #25)Neither body contains Tomcat manager HTML, but the probe still confirmed CRITICAL.
Root cause
if status == 200:returned a confirmed finding immediately. Default-credential 200s had the same gap (any Basic-auth 200 counted as Tomcat).Fix
Require distinctive Tomcat manager HTML (
Tomcat Web Application Manager,Manager Application,html-manager) for both the unauthenticated-200 and default-creds-200 paths. Passschemefrom the orchestrator so HTTPS ports are probed over TLS.Validation
python3 -m pytest test_probers.py test_hardening.py -q— 65 passed.New cases: generic SPA/login/JSON 200 rejected; real manager HTML still confirms CWE-306; default
admin:adminstill confirms; generic 200 after Basic auth rejected.