/

CVE-2026-45332

Severity:

HIGH RISK

(7.5)

Broken Access Control in Automad Setup API

CVE-2026-45332

Deferred

Vulnerability type

Category:

Broken Access Control

CWE:

CWE-200, CWE-306

Impact:

Exposure of Authentication Secrets and Account Compromise Risk

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Automad versions 2.0.0-alpha.1 through 2.0.0-beta.27 expose administrator password hashes to unauthenticated users via a misconfigured setup endpoint.

Because the initial user-creation API remains publicly accessible and returns full serialized user data, an attacker can obtain bcrypt hashes for all admin accounts with a single POST request, enabling offline password cracking and account takeover attempts.

Affected context

This vulnerability affects Automad instances deployed with versions from 2.0.0-alpha.1 through 2.0.0-beta.27 that:

  • Have completed initial setup, but still expose the /_api/user-collection/create-first-user endpoint to unauthenticated clients
  • Return serialized user objects, including bcrypt password hashes, in JSON responses from this endpoint
  • Are reachable over a network (e.g., internet-facing CMS deployments or internal portals without additional network-layer controls)

The issue is specifically tied to how the setup API endpoint is protected and what data it returns after the system has already been configured.

Exploit preconditions

  • Attack surface: HTTP(S) interface of the Automad instance, specifically the /_api/user-collection/create-first-user endpoint.
  • Required access: No authentication required; the endpoint is accessible to any network client that can reach the CMS.
  • Trigger point: Sending a crafted POST request to the setup API after the initial configuration is already complete.
  • Why exploitation is possible:
  • The setup endpoint is not disabled or restricted once a first user exists (violation of CWE-306: Missing Authentication for Critical Function).
  • The endpoint returns fully serialized user data, including bcrypt password hashes, to unauthenticated callers (CWE-200: Exposure of Sensitive Information).
  • There is no context-aware check to treat this endpoint differently after the system has left the setup phase.

Why this happens

The underlying issue is a combination of incomplete authorization design and overly permissive data exposure in a setup-related API.

From an access control perspective (CWE-306), a critical function intended only for bootstrapping (creating the first user) remains available without authentication even after normal operation begins. The system does not enforce that only unauthenticated, uninitialized states can access this endpoint, nor does it bind it to a one-time initialization workflow.

From a data handling perspective (CWE-200), the API returns full serialized user records, including bcrypt password hashes, in response to this unauthenticated request. This reflects a broader pattern where internal user representation is exposed directly through the API without a "presentation-layer" model that strips sensitive fields.

Abstractly, this is the insecure pattern of:

  • Leaving setup or administration endpoints enabled and unauthenticated beyond installation time.
  • Returning sensitive authentication material (password hashes) in API responses without regard for caller identity or minimal data needs.

Potential impact

  • Attackers may obtain bcrypt password hashes for all administrator accounts.
  • Offline password cracking attempts can be performed to recover plaintext admin passwords.
  • Successful cracking can lead to full administrative compromise of the CMS instance.
  • Compromised admin accounts may be reused against other systems if passwords are shared across services.
  • Exposure of internal user metadata may aid in social engineering or targeted attacks.
  • Regulatory or compliance consequences if password data exposure violates security or privacy requirements.

General mitigation guidance

Effective mitigation typically focuses on tightening access control around setup endpoints and minimizing sensitive data exposure in API responses:

  • Retire or lock down setup endpoints after initialization:
  • Treat installation and "first user" creation as a one-time operation.
  • Enforce state checks so that once a first user exists, setup APIs are disabled or require strong authentication and explicit administrative intent.
  • Enforce authentication for critical functions:
  • Apply a default-deny posture where any function that returns user data or modifies user accounts requires authentication and appropriate authorization checks.
  • Centralize access control decisions in middleware or a security layer rather than inline in controllers.
  • Avoid returning sensitive fields in user representations:
  • Separate internal user models from public API DTOs and explicitly omit password hashes, password reset tokens, and other secrets from responses.
  • Implement "safe serialization" routines that whitelist allowed fields instead of blacklisting sensitive ones.
  • Harden deployment configuration:
  • Place administrative and setup interfaces behind additional protections such as VPNs, IP allowlists, or reverse proxies with authentication.
  • Limit who can reach backend APIs directly, particularly in internet-facing deployments.
  • Adopt secure-by-default installation flows:
  • Design installers so that once the application is configured, any installer/setup routes are automatically disabled and require deliberate re-enablement by administrators.

How teams detect issues like this

To detect similar vulnerabilities and monitor for active abuse, organizations can:

  • Static and code-level review:
  • Scan for routes or controllers tied to setup, install, or bootstrap operations and verify they enforce authentication outside of initial state.
  • Review API response serializers or JSON encoders for inclusion of password hashes or other sensitive fields.
  • Use static analysis rules or linters to flag any serialization of password fields, credential hashes, or authentication tokens in HTTP responses.
  • Configuration and architectural review:
  • Periodically assess which endpoints are exposed externally and confirm that initialization or maintenance endpoints are not reachable from untrusted networks.
  • Verify that access control is centralized and consistently applied to all user and admin data endpoints.
  • Runtime monitoring and logging:
  • Log access to setup and user-management endpoints, with alerts for unexpected calls after installation.
  • Monitor for spikes in requests to endpoints that should rarely be used, indicating reconnaissance or exploitation attempts.
  • Automated security testing:
  • Integrate API-focused security testing tools or DAST scanners to probe for unauthenticated access to administrative functions and leakage of password hashes.
  • Incorporate these checks into CI/CD pipelines to catch reintroductions of similar flaws.

Sources

SourceLink
github.comgithub.com/marcantondahmen/automad/security/advisories/GHSA-xm76-r88j-vm3g

Frequently asked

questions

Yes, if the Automad instance is reachable over the network (for example, exposed on the public internet or within a reachable internal network) and no additional network-layer protections are in place. An attacker can issue a POST request directly to the setup API endpoint.

No prior authentication is required. The vulnerability arises specifically because the /_api/user-collection/create-first-user endpoint is exposed without authentication after setup, so any unauthenticated client that can reach the CMS can attempt to retrieve administrator password hashes.

The safest pattern is to ensure setup and bootstrap endpoints are disabled or strictly restricted once initialization completes, while always requiring authentication and appropriate authorization for endpoints that handle user data. Additionally, APIs should never include password hashes or similar secrets in their responses; create separate response models that exclude sensitive fields by design.

Prevention hinges on secure-by-design principles: treat installation flows as temporary, enforce authentication for all sensitive operations, minimize data returned in API responses, and apply threat modeling to identify any endpoints that could expose credentials or administrative capabilities. Combining code review, automated checks for sensitive fields in responses, and regular review of exposed endpoints helps ensure these controls stay in place over time.

Find out what's already
exploitable in your codebase.