Summary
sysPass through version 3.2.11 contains an insecure direct object reference flaw in its account file attachment handling logic, allowing authenticated users to bypass account-level ACL enforcement.
By submitting arbitrary numeric attachment IDs to the AccountFileController endpoints, attackers can access, enumerate, and manipulate files associated with accounts they are not authorized to view.
Affected context
This vulnerability appears when sysPass is deployed with multi-user access to the password vault and relies on account-level ACLs for attachment protection.
It affects the attachment management workflows implemented in AccountFileController, where file operations (download, view, delete, upload, list) accept user-supplied file identifiers and perform the requested action without consistently verifying that the current user has permission on the owning account.
Environments that expose these controller actions to general authenticated users, such as shared team vaults, are particularly susceptible.
Exploit preconditions
- Attack surface: HTTP endpoints in
AccountFileControllerhandling file attachment operations (download, view, delete, upload, list). - Required access: Any authenticated sysPass account, even with minimal privileges.
- Trigger point: Supplying crafted or iterated numeric file IDs in requests to attachment-related actions.
- Why exploitation is possible: The controller trusts the provided file ID and performs actions on the corresponding attachment without reliably checking whether the requester has ACL permissions on the related account, enabling direct object reference abuse.
Why this happens
The underlying issue is a broken access control pattern characteristic of insecure direct object references (IDOR), mapped to CWE-639.
The implementation exposes internal identifiers for file attachments as user-controllable parameters and binds authorization checks to the existence of a valid ID rather than to the relationship between the requesting user and the owning account.
Because the system does not consistently enforce account-level ACL validation for each file operation, users can enumerate or guess attachment IDs and directly invoke actions on resources they should not be able to access, modify, or delete.
Potential impact
- Unauthorized viewing and download of sensitive attachment files belonging to other accounts.
- Enumeration of attachment metadata across the vault, revealing structure and possibly internal identifiers.
- Unauthorized deletion or modification of attachments, leading to data loss or tampering.
- Correlation of attachments with accounts to aid broader compromise of stored secrets.
- Potential for privilege abuse where low-privilege users can access high-sensitivity account artifacts.
General mitigation guidance
Effective mitigation generally focuses on strengthening object-level authorization and decoupling trust from user-supplied identifiers.
Recommended patterns include:
- Enforcing per-request authorization checks that validate the caller's permissions against the owning account before performing any operation on an attachment.
- Restricting the exposure and use of raw numeric IDs, for example by using opaque, scoped identifiers that are tied to the requester's accessible resources.
- Centralizing access control logic so that controllers cannot bypass ACL checks and must always consult a shared policy layer.
- Applying the principle of least privilege to authenticated users, limiting their ability to invoke broad file operations where possible.
- Designing APIs so that attachment operations are always contextual to an account object that has already passed authorization checks.
How teams detect issues like this
Organizations can identify similar IDOR issues using:
- Static analysis rules and security linters that flag controller actions using user-supplied IDs without adjacent authorization checks.
- Code review practices that trace how resource identifiers flow from HTTP parameters to data access layers, ensuring ACL validation is consistently applied.
- Automated tests that attempt access to attachments and other resources from users lacking ACL permissions, validating that operations are denied.
- Policy enforcement in CI/CD requiring explicit authorization checks in controllers and discouraging direct use of raw IDs in endpoints.
- Periodic penetration testing focusing on object ID enumeration and parameter tampering across resource-heavy modules like file vaults.

