Skip to content

Don't confirm Apache path traversal from an HTML passwd example - #49

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-management-e58c
Draft

cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-management-e58c

Conversation

@cursor

@cursor cursor Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Bug and impact

probe_apache_path_traversal confirmed CVE-2021-41773 / CVE-2021-42013 as CRITICAL whenever a raw HTTP response contained root: plus /bin/ (or nologin / daemon:). The probe uses _raw_http, which does not apply the SPA/CDN baseline filter used by _http_get, and it never checked the status line.

Trigger: scan any site whose 404 or catch-all HTML quotes a Linux passwd example (security blogs, Linux tutorials, cheat sheets). GET /cgi-bin/.%2e/.%2e/.%2e/.%2e/etc/passwd returns that HTML; fusion pins the probe-confirmed CVE as un-droppable. Operators see a confirmed Apache 2.4.49 RCE on a host that is not vulnerable.

Root cause

Confirmation searched the entire raw response (headers + body) for generic passwd tutorial tokens. HTTP 404 pages and HTML articles routinely include root:x:0:0:root:/root:/bin/bash.

Fix and validation

Require HTTP 200, reject HTML bodies, and match a real /etc/passwd root:<hash>:<uid>:<gid>: line in the body only. Shared helper covers both the single-encoded and double-encoded probes.

Validation:

  • New tests: 404 HTML tutorial and 200 HTML <pre> passwd snippet do not confirm; raw 200 passwd still confirms 41773 and 42013.
  • python3 -m pytest test_probers.py test_fusion_engine_bridge.py test_ai_agent.py::test_cve_probe_apache_path_traversal_marker -q — 56 passed.
Open in Web View Automation 

CVE-2021-41773/42013 used _raw_http and treated any response containing
"root:" plus "/bin/" as a retrieved /etc/passwd. A 404 docs page or SPA
catch-all quoting a passwd snippet therefore pinned a CRITICAL finding.
Require HTTP 200, reject HTML, and match a real passwd root line.

Co-authored-by: dmitryflynn <dmitryflynn@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant