Summary
EUSurvey's public contribution-edit endpoint can accept answer changes without verifying that the edit code in the URL belongs to the contribution identified in the request body. An unauthenticated attacker who knows a contribution ID may therefore overwrite another respondent's submitted answers.
Affected context
The issue affects EUSurvey through version 1.6, before commit de1145c, in the public POST /editcontribution/{code} endpoint. It occurs when the handler selects a survey and answer set using a numeric contribution ID from the request body but does not confirm that the URL's private edit code is associated with that contribution.
Exploit preconditions
- Attack surface: Public contribution-edit POST endpoint
- Required access: No authentication is required; the attacker must know a contribution ID
- Trigger point: The endpoint processes an answer update for the specified contribution
- Why exploitation is possible: The handler uses the body-supplied contribution ID without checking that the private edit code in the URL matches the selected contribution
Why this happens
The handler relies on a user-controlled numeric identifier to select a contribution without enforcing an authorization check tying that contribution to the supplied private edit code. This is an authorization bypass through a user-controlled key, mapped to CWE-639. The underlying insecure pattern is allowing an object reference to determine which record can be changed without verifying the requester's authority over that specific record.
Potential impact
- An attacker could overwrite another respondent's saved answers.
- Survey response integrity may be affected.
- Survey owners may receive altered or unreliable results.
- Respondents may lose the answers they previously submitted.
General mitigation guidance
Mitigation generally focuses on enforcing authorization for each contribution at the point of access or modification.
Common defensive patterns include:
- Verify that the supplied edit token is bound to the specific contribution being changed.
- Derive the target record from a validated authorization token rather than trusting a standalone client-supplied identifier.
- Apply object-level authorization checks to every update path, including public endpoints.
- Minimize the data and operations exposed through unauthenticated endpoints.
- Use unguessable, scoped tokens and handle them as sensitive credentials.
How teams detect issues like this
High-level review and monitoring approaches include:
- Inspect update handlers for client-supplied record IDs that are not checked against an authorization token or user identity.
- Use static analysis rules to flag writes to records selected by request parameters without nearby object-level authorization checks.
- Review API tests and security policies to ensure that mismatched identifiers and tokens are rejected.
- Monitor for unusual patterns of repeated contribution updates or changes to records from unexpected sources.
Automated code review tools may help identify direct-object-reference and authorization-check gaps.

