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): consent is not enforced on write paths — ConsentService.check_access only checks consent for read/search [Severity: Medium] #558
ConsentService.check_access() (spp_api_v2/services/consent_service.py, ~450) evaluates consent only when action in ("read", "search"). For update/delete it checks scope and returns True. So the write endpoints that
use it (check_individual_access / check_group_access in routers/dependencies.py, and the group router's
update/merge checks) never evaluate consent:
PUT / PATCH /Individual/{id}, PUT / PATCH /Group/{id}
$add-member, $remove-member, member update, $merge, $split
A client configured with is_require_consent and write scopes can modify registrants it has no consent for, while
it cannot read them.
Expected
Decide the policy (consent required to process/modify, per docs/principles/consent-data-sharing.md), then enforce it
on every write path with the same predicate reads use (filter_response statuses no_consent / scope_mismatch),
with tests for a consent-requiring client without consent on each write endpoint.
Context
Found in the adversarial review of PR #555 (#554); pre-existing, not introduced there.
Note from the #555 review round: the write paths also leak existence, not only consent.
On $add-member and the other member operations, a member individual that doesn't exist gets a plain 404, while one that exists but has no consent goes through. A consent-filtered client can therefore probe whether a registrant exists by referencing it as a member.
After #555 the read and not-found paths all use one predicate, ConsentService.is_consent_filtered(api_client). The fix here should reuse it, so an unknown member and an unconsented member get the same answer (the jittered 403 that reads give).
Activity
gonzalesedwin1123 commentedon Sep 29, 2026
Note from the #555 review round: the write paths also leak existence, not only consent.
On
$add-memberand the other member operations, a member individual that doesn't exist gets a plain 404, while one that exists but has no consent goes through. A consent-filtered client can therefore probe whether a registrant exists by referencing it as a member.After #555 the read and not-found paths all use one predicate,
ConsentService.is_consent_filtered(api_client). The fix here should reuse it, so an unknown member and an unconsented member get the same answer (the jittered 403 that reads give).