Summary
NocoDB's shared-view attachment-download endpoint may disclose attachments belonging to records excluded by the view's row filter. An unauthenticated person with a public share link could enumerate sequential primary keys to obtain signed download paths for those attachments.
Affected context
The issue concerns attachment downloads through shared views. It becomes a risk when a public share link is available and attachment access does not consistently enforce the view's row filter for the requested record.
Exploit preconditions
- Attack surface: The shared-view attachment-download endpoint
- Required access: A public share link; authentication is not required
- Trigger point: Requesting attachment downloads for records identified by primary keys
- Why exploitation is possible: Sequential keys may be enumerated to obtain signed download paths for attachments on records filtered out of the shared view
Why this happens
The underlying issue is an authorization check that may rely on a user-controlled record key without ensuring that the referenced record is visible under the shared view's row filter. This maps to CWE-639: Authorization Bypass Through User-Controlled Key. When attachment access is not bound to the share's permitted record set, a key outside that set may still lead to a valid download path.
Potential impact
- An attacker may access attachments that the shared view is intended to exclude.
- Sensitive information contained in those files could be disclosed.
- Exposed files could create privacy, compliance, or business risks.
General mitigation guidance
Defensive patterns focus on enforcing authorization at the point of every attachment access:
- Derive record access from the shared view's authorized scope rather than trusting a supplied primary key.
- Apply row filters consistently to attachment lookup and download operations.
- Use secure-by-default sharing that exposes only explicitly permitted records and files.
- Treat public share links and record identifiers as untrusted inputs, and avoid relying on identifier unpredictability as an access control.
- Limit the privileges and data available to shared-view endpoints.
How teams detect issues like this
Review attachment-download handlers for authorization decisions based solely on client-supplied record identifiers, and verify that row filters are enforced on every access path. Static analysis and code review can flag object lookups followed by file access without a scoped authorization check. Policy tests can confirm that filtered-out records and their attachments remain inaccessible through public shares; monitoring may also help identify unusual sequential-key access patterns.

