You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
security(spp_api_v2_programs): POST /ProgramMembership "Beneficiary not found: <ref>" 422 reveals registrant existence [Severity: Low] #560
ProgramMembershipService.from_api_schema() raises ValidationError("Beneficiary not found: <reference>")
(spp_api_v2_programs/services/program_membership_service.py, ~312), which the create/update routers return as 422.
A client holding program_membership:create but requiring consent can tell whether a registrant exists (422 "not
found" vs a created or otherwise-refused membership), which the read endpoints avoid by answering 403.
Proposal
For consent-requiring clients, answer an unknown beneficiary the same way as a beneficiary the client may not access
(403, jittered), and cover it with a test. Note that create-with-existing-identifier 409s (PR #555) are an accepted,
documented existence signal for create-scope clients; this issue is about the beneficiary reference on membership
create/update.
Context
Found in the adversarial review of PR #555 (#554); pre-existing.
Activity