Summary
EUSurvey contains an authorization flaw in its contact-sharing settings that can let an authenticated user access or change another user's share. An ordinary account without Contact Management privileges may be able to view names and email addresses, or alter the share's name, recipients, access mode, or contacts.
Affected context
The issue affects EUSurvey through version 1.6, before commit edb5021, in the GET /settings/shareEdit/{shareId} and POST /settings/shares handlers. It becomes risky when an authenticated user can reach these handlers and the ownership check fails to reject requests for shares belonging to someone else.
Exploit preconditions
- Attack surface: The contact-sharing settings endpoints.
- Required access: An authenticated EUSurvey account; Contact Management privileges are not required.
- Trigger point: A request to view or modify a share through the affected handlers.
- Why exploitation is possible: The ownership check uses a condition that does not deny access, allowing requests involving another user's share to proceed.
Why this happens
The controller's authorization logic incorrectly evaluates whether the requesting user owns a share. Its denial condition requires a state to be both true and false, so the check does not reject unauthorized access as intended.
This is CWE-863: Incorrect Authorization: the application fails to enforce the required permission check before allowing access to or modification of a protected resource.
Potential impact
- An authenticated user may view names and email addresses associated with another user's share.
- An attacker could rename a share or change its recipient or access mode.
- An attacker may replace contacts in another user's share.
- Changes could disrupt intended sharing or expose contact information to unintended recipients.
General mitigation guidance
Common defensive patterns include:
- Enforce resource ownership and authorization checks on every read and write operation.
- Use a centralized authorization policy that fails closed when ownership or permissions cannot be confirmed.
- Derive resource access decisions from the authenticated user's identity and the requested resource, rather than relying on client-provided ownership data.
- Apply least privilege to sharing operations and limit returned contact data to what the user is authorized to see.
- Test authorization boundaries for both viewing and modifying resources.
How teams detect issues like this
Review controller and service code for resource access paths where authentication is checked but ownership or permissions are not enforced consistently. Look for inverted, contradictory, or fail-open boolean conditions in authorization logic.
Add automated tests that attempt to view and modify another user's shares using an ordinary account. Static analysis and policy checks can also flag handlers that access user-owned resources without a corresponding authorization decision.

