Skip to content

SEC: Unauthenticated Setup Endpoint — installation hijack race condition #177

Closed

Description

@vybe

Pentest Finding 3.1.6 — High (CVSS 7.5)

CVSS Vector: CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Location: POST /api/setup/admin-password

Impact

Any unauthenticated user who accesses the application before the legitimate administrator completes the initial setup can hijack the installation. By reaching the setup endpoint first, an attacker sets the administrator password, gaining full administrative control over the entire platform. This creates a severe "first-come, first-served" race condition during deployment.

Steps to Reproduce

# No authentication required
POST /api/setup/admin-password
{"password":"adminadmin","confirm_password":"adminadmin"}
# Returns: {"success":true}

Remediation

  • Ensure the setup routine listens exclusively on the loopback interface (127.0.0.1), requiring local access or SSH tunnel
  • Implement a persistent migration flag (in the database or config file) that permanently disables the setup endpoint after the first successful run
  • If network access is absolutely necessary, require a randomly generated, single-use token printed to the server's local console logs at startup

References

Source: UnderDefense Web Pentest Report, March 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    pentestpriority-p0securityseverity-high

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions