Summary
Seahub fails to enforce the SHARE_LINK_LOGIN_REQUIRED setting on the GET /api/v2.1/share-link-zip-task/ endpoint, leaving share-link zip downloads accessible without authentication.
An attacker who possesses a valid folder share-link token can directly obtain a fileserver zip token and download entire shared directory trees, even when login should be required.
Affected context
This vulnerability appears in Seahub deployments that expose the /api/v2.1/share-link-zip-task/ endpoint for generating zip download tokens for shared folders.
It becomes relevant when administrators rely on the SHARE_LINK_LOGIN_REQUIRED configuration to enforce login before access to share links, but the API endpoint does not consistently check that requirement.
Any environment where folder share-link tokens are broadly distributed or guessable is at higher risk, especially if users expect authentication before bulk downloads.
Exploit preconditions
- Attack surface: Publicly reachable Seahub HTTP API endpoint at /api/v2.1/share-link-zip-task/
- Required access: Possession of a valid folder share-link token (no authenticated session needed)
- Trigger point: Issuing an unauthenticated GET request to the share-link-zip-task API with the share-link token
- Why exploitation is possible: The endpoint fails to enforce SHARE_LINK_LOGIN_REQUIRED or equivalent authorization checks, allowing unauthenticated callers to obtain fileserver zip tokens and download shared directory contents.
Why this happens
The root cause is a missing authorization control on a sensitive API route responsible for generating zip download tokens from share links.
While Seahub provides configuration (SHARE_LINK_LOGIN_REQUIRED) intended to require login before share-link access, the GET /api/v2.1/share-link-zip-task/ handler does not consistently apply this policy.
This maps to CWE-862: Missing Authorization, where a protected resource or operation is exposed without validating that the caller is authorized under the configured security rules.
Potential impact
- Unauthenticated users may download entire shared directory trees via zip archives.
- Sensitive or confidential files could be accessed without the expected login requirement.
- Users' assumptions about protected share links can be violated, undermining trust in the sharing model.
- Bulk exfiltration of shared data may occur, increasing risk of data leakage and privacy incidents.
General mitigation guidance
Effective mitigation focuses on ensuring that all share-link related endpoints consistently enforce authorization policies.
Typical defensive patterns include:
- Applying centralized authorization checks based on configuration flags (such as SHARE_LINK_LOGIN_REQUIRED) to every API route that operates on share links or download tokens.
- Treating link tokens as sensitive credentials and validating both user authentication state and link permissions before issuing zip or download tokens.
- Designing API handlers to default to denial for unauthenticated requests when configuration implies authentication should be required.
- Reviewing share-link workflows to minimize unauthenticated bulk download capabilities and limiting the scope and lifetime of share-link tokens.
How teams detect issues like this
Organizations can detect similar authorization gaps by:
- Performing endpoint-focused code reviews to confirm that each route enforcing sharing or download operations checks both authentication and configured access policies.
- Using static analysis or API security tools to flag handlers that generate access or download tokens without prior authorization checks.
- Running integration tests that simulate unauthenticated requests against share-link and download endpoints when login-required configurations are enabled.
- Employing security monitoring and access logs to identify patterns of unauthenticated bulk downloads from share-link related APIs.

