Skip to content

Don't confirm .env CRITICAL from an HTML login page - #48

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

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

Conversation

@cursor

@cursor cursor Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Bug and impact

check_http_admin_panels confirmed CRITICAL Environment File Exposed when GET /.env (or /.env.backup) returned HTTP 200 and the body contained the substring password / SECRET / API_KEY / DB_.

Fusion treats every service-probe finding as source=probe + high reliability, so the gate pins it as un-droppable.

Trigger: Scan a site whose custom 200 error page (or CMS chrome) includes a login form. The random-path baseline is a different 200 (the requested path is echoed in the title), so the CDN/SPA baseline filter does not apply. The probe then fusion-pins a CRITICAL env leak that is just an HTML password field.

A real dotenv file is still reported.

Root cause

Confirmation was keyword-only. password matches <input type="password"> and "Forgot password" copy. web_fingerprint already rejects HTML and requires KEY=value lines; the service prober did not.

Fix

Require dotenv structure (KEY=value lines, not an HTML shell) before confirming /.env or /.env.backup. Real files such as DB_PASSWORD=hunter2 still confirm CRITICAL.

Validation

  • test_admin_panel_env_with_creds — real dotenv still CRITICAL
  • test_admin_panel_env_html_login_form_not_critical — HTML login 200 is not a finding
  • test_looks_like_dotenv_accepts_real_rejects_html
  • test_admin_panel_spa_catchall_no_false_critical still passes
  • python3 -m pytest test_probers.py test_web_fingerprint.py -q — 74 passed
Open in Web View Automation 

check_http_admin_panels treated any HTTP 200 at /.env whose body
contained "password" as an exposed environment file. A custom 200
error page or CMS chrome with a login form then fusion-pinned a
CRITICAL finding. Require KEY=value dotenv lines, matching the
web_fingerprint validator.

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