Summary
WeddingShare's anonymous gallery-item action can reveal upload paths and uploader names without verifying the gallery secret key. An unauthenticated attacker may enumerate item IDs and use the exposed paths to access photos or videos when those files are served without equivalent authorization checks.
Affected context
The issue affects WeddingShare galleries where the anonymous MediaViewerController.GalleryItem action is reachable and item IDs can be queried. Risk increases when the action returns upload paths without checking the gallery secret and the corresponding media files are available as static files without a separate access-control check.
Exploit preconditions
- Attack surface: The publicly reachable gallery-item action and the static-file paths it exposes
- Required access: No authentication is required according to the vulnerability description
- Trigger point: Requests for gallery items using their integer IDs
- Why exploitation is possible: The action does not enforce authorization using the gallery secret before disclosing item paths and uploader names; sequential IDs may make items easier to enumerate
Why this happens
The underlying bug is a missing authorization check, mapped to CWE-862. The application exposes gallery-item information through an anonymous action without first establishing that the requester is permitted to view the protected gallery. If file delivery also lacks access controls, knowledge of a static-file path can bypass the intended gallery restriction.
Potential impact
- Attackers may learn upload paths and uploader names
- Photos and videos in key-protected galleries could be disclosed
- Private information shown in media may be exposed
- Users may lose confidence in the privacy of protected galleries
General mitigation guidance
Defensive patterns include enforcing authorization at every point where protected gallery data or media is accessed, rather than relying on obscurity of item IDs or paths. Apply the gallery secret or an equivalent authorization decision before returning item metadata, and ensure static-file delivery follows the same access policy. Reduce exposure of internal upload paths, use least-privilege file access, and prefer secure-by-default media delivery that denies access unless permission is established.
How teams detect issues like this
Review anonymous controller actions that return gallery metadata, filenames, or storage paths, and check whether authorization is enforced before data is returned. Trace media URLs through the serving layer to confirm that static files cannot be retrieved outside the gallery access policy. Static analysis and code review can flag sensitive resource access without an associated authorization check; policy tests can verify that unauthenticated requests are denied and that item identifiers do not expose protected content.

