Summary
ChurchCRM's family management API endpoints allow authenticated users to modify the state of any family record by tampering with the {familyId} parameter, even when they lack the necessary EditRecords privilege.
This broken object-level authorization lets users deactivate or reactivate families, spam verification emails, mark families as verified, and trigger geocoding for arbitrary family records under normal authenticated usage conditions.
Affected context
The vulnerability exists in ChurchCRM deployments where:
- The application exposes family management endpoints such as:
POST /family/{familyId}/verifyPOST /family/{familyId}/verify/urlPOST /family/{familyId}/verify/nowPOST /family/{familyId}/activate/{status}POST /family/{familyId}/geocode- Any authenticated API user can call these endpoints.
- Authorization checks verify authentication but do not verify that the caller:
- Owns the targeted family record, or
- Holds a role/permission (such as EditRecords) appropriate for that record.
In such environments, the API treats the familyId path parameter as trusted input without binding it to the caller's effective permissions.
Exploit preconditions
- Attack surface: Authenticated HTTP(S) API endpoints in the ChurchCRM web application.
- Required access: Any valid authenticated account with API access; elevated roles are not required.
- Attacker capabilities: Ability to intercept or craft HTTP requests and change the
{familyId}(and{status}) path parameter values. - Trigger point: Invocation of vulnerable endpoints:
/family/{familyId}/verify/family/{familyId}/verify/url/family/{familyId}/verify/now/family/{familyId}/activate/{status}/family/{familyId}/geocode- Why exploitation is possible: The application checks that the user is logged in but fails to enforce record-level authorization or role-based access control on the targeted family resource, allowing direct object reference manipulation.
Why this happens
This issue stems from broken object-level authorization, where the API trusts client-supplied identifiers without confirming that the caller is authorized to act on the referenced object.
Specifically, endpoints operating on familyId:
- Perform authentication, but
- Do not consistently:
- Check whether the user has the EditRecords privilege or equivalent rights, or
- Validate ownership or scope of access for the targeted family.
This maps to:
- CWE-639: Authorization Bypass Through User-Controlled Key – because the resource key (
familyId) is directly controlled by the client. - CWE-863: Incorrect Authorization – due to incomplete or missing authorization checks on privileged operations (activation, verification, geocoding).
Abstractly, the insecure pattern is: "Any authenticated user can invoke state-changing operations on arbitrary resources by guessing or enumerating identifiers, because authorization is not enforced at the object level."
Potential impact
- Authenticated users may deactivate or reactivate arbitrary family records, disrupting normal operations.
- Users can mark families as verified without appropriate authorization, undermining data integrity and trust in verification workflows.
- Attackers can spam verification emails to targeted families by repeatedly calling verification-related endpoints.
- Uncontrolled geocoding requests can be triggered for arbitrary families, potentially increasing external service usage or exposing location-related metadata in unintended ways.
- Combined with other weaknesses (e.g., enumeration of valid IDs), an attacker can systematically manipulate large portions of the family database.
General mitigation guidance
Effective mitigation focuses on enforcing consistent, centralized authorization for every operation that targets a specific resource:
- Enforce object-level authorization on every endpoint:
- For each family-related action, validate that the caller is allowed to operate on that specific
familyId(e.g., via ownership checks or role-based permissions). - Tie business operations (verify, activate/deactivate, geocode) to explicit privileges such as EditRecords or dedicated, narrowly scoped permissions.
- Centralize access control logic:
- Use shared middleware, decorators, or policy layers so that all resource-handling endpoints automatically enforce authorization rather than relying on per-endpoint ad hoc checks.
- Constrain actions by business rules:
- Limit who may send verification emails or change verification status, and rate-limit repeated actions on the same record.
- Restrict activation/deactivation operations to administrative or staff roles.
- Avoid trusting client-supplied identifiers by default:
- Treat IDs in the path or query as untrusted and always pair them with server-side checks that confirm relationship and permissions before performing any state changes.
- Apply least privilege:
- Ensure accounts and API tokens are granted only the minimum capabilities needed, and avoid giving generic authenticated users broad modification rights.
How teams detect issues like this
Detection typically combines code-centric and behavioral approaches:
- Static and code review checks:
- Identify all controllers/handlers that accept
familyIdas input and review whether they consistently call a central authorization routine. - Use static analysis or custom linters to flag endpoints that:
- Modify or verify resources without invoking permission checks, or
- Only check authentication but not object-level authorization.
- Policy and framework enforcement:
- Adopt a policy-based access control framework (e.g., RBAC/ABAC) that forces developers to declare required permissions per endpoint.
- Configure automated review tools to highlight new routes that bypass the shared authorization mechanism.
- Runtime monitoring and logging:
- Log calls to sensitive endpoints (
/family/*/activate,/family/*/verify,/family/*/geocode) including caller identity and targetfamilyId. - Monitor for patterns such as:
- A single low-privilege account modifying many different families.
- Repeated verification or geocode requests on multiple records from the same user or IP.
- Testing and security validation:
- Include authorization tests in CI that attempt to access or modify records belonging to other users or groups using standard accounts.
- Perform regular penetration tests focusing on IDOR and broken access control patterns for all resource-based routes.

