Summary
HireFlow v1.2 contains a broken object-level authorization flaw in the /candidate/<id> and /interview/<id> endpoints, where access to records is granted solely based on a user-supplied identifier.
Any authenticated user can enumerate IDs in the URL path to read other users' candidate profiles and interview notes, resulting in horizontal privilege escalation and potential disclosure of all records in the system.
Affected context
The vulnerability appears in HireFlow v1.2 wherever object details are fetched via REST endpoints that rely on a numeric identifier in the URL, such as /candidate/<id> and /interview/<id>.
The issue manifests when the application:
- Treats authentication as sufficient for data access
- Uses a direct database lookup by ID from request parameters
- Does not verify ownership or role-based permissions for the requested record
This pattern is typical in multi-tenant or multi-user SaaS applications where each user should only see their own or permitted records.
Exploit preconditions
- Attack surface: HTTP(S) API endpoints
/candidate/<id>and/interview/<id> - Required access: Any valid authenticated account in the HireFlow application
- Trigger point: Supplying another user's record identifier in the URL path (e.g., incrementing or decrementing integer IDs)
- Why exploitation is possible: The server performs a direct object lookup based on the URL ID without confirming that the requesting user owns, created, or is authorized to view the corresponding candidate or interview record.
Why this happens
This issue is a classic example of broken object-level authorization, mapped to CWE-639.
The route handlers trust the user-provided <id> parameter and perform a direct database retrieval (get_by_id) with no subsequent check that the current user is allowed to access that object.
Conceptually, the application conflates being logged in with being authorized for a specific object, and fails to enforce per-record access control, creating an insecure direct object reference (IDOR) condition across candidate and interview resources.
Potential impact
- Unauthorized viewing of all candidate profiles stored in the system
- Exposure of interview notes, feedback, and potentially sensitive HR assessments
- Reconstruction of internal organizational structure and hiring activities
- Loss of privacy for candidates and interviewers
- Regulatory and contractual non-compliance due to personal data leakage
General mitigation guidance
Effective mitigation centers on enforcing object-level authorization for every data access path:
- Introduce explicit ownership or tenancy checks when loading objects (e.g., ensure
record.owner_id == current_user.idor that the user has a role permitted for that record). - Apply role-based or attribute-based access control policies at the service or middleware layer rather than relying solely on controller logic.
- Avoid exposing raw, guessable identifiers alone as the basis for authorization; combine identifiers with tenant or account context when resolving records.
- Design APIs so that sensitive object lookups are derived from the authenticated context where possible (e.g., "my candidates") instead of arbitrary IDs.
- Implement least-privilege defaults: deny access unless an explicit rule grants permission to a specific user or role for a specific object.
How teams detect issues like this
To detect similar issues, organizations can:
- Use static analysis or custom linters to flag controller or route handlers that:
- Fetch objects directly by user-supplied IDs
- Do not invoke a central authorization or policy check before returning data
- Perform code reviews focusing on endpoints returning single records to verify they call standardized authorization helpers.
- Implement security tests and API fuzzing that attempt ID enumeration with multiple user accounts to identify horizontal access control flaws.
- Enforce architectural patterns where all object access flows through an authorization layer or service, making missing checks easier to spot.

