Summary
A missing authorization check in sysPass allows users with the PUBLICLINK_CREATE privilege to generate public links for vault accounts they are not permitted to access.
By abusing the public link creation flow, an attacker can force decryption and persistent storage of any account's password, which may later be retrieved without authentication if the link hash is obtained.
Affected context
This vulnerability appears in sysPass deployments that rely on profile flags to govern public link creation for vault accounts.
It affects scenarios where the PUBLICLINK_CREATE profile flag is assigned to users and the application assumes that downstream account access control lists (ACLs) will be enforced by all flows.
The issue is present in the public link creation path, where account access filtering is not consistently applied before credentials are decrypted and stored.
Exploit preconditions
- Attack surface: Application HTTP interface (saveCreateFromAccountAction endpoint)
- Required access: An authenticated sysPass account with the PUBLICLINK_CREATE profile flag
- Trigger point: Invoking the public link creation flow targeting arbitrary account identifiers
- Why exploitation is possible: The AccountService::getDataForLink call loads and decrypts account data without applying AccountAcl or AccountFilterUser restrictions, allowing sensitive credentials for unrelated accounts to be serialized into a public link record.
Why this happens
The underlying issue is an authorization bypass where the system validates that a user is allowed to create public links but fails to re-check whether that user is authorized to access the specific account being linked.
Instead of enforcing account-level ACLs in the saveCreateFromAccountAction flow, the code path trusts the provided account identifier and uses the session master key to decrypt credentials.
This behavior maps to CWE-639, where functionality intended for authorized resources is exposed to users who do not have permission because resource-level access controls are missing or inconsistently applied.
Potential impact
- Unauthorized decryption of passwords for any vault account
- Persistent storage of cleartext credentials in public link records
- Subsequent unauthenticated retrieval of sensitive passwords if link hashes are leaked or guessed
- Exposure of shared or administrative credentials that can facilitate lateral movement
- Compromise of compliance posture due to unprotected storage of secret data
General mitigation guidance
Mitigation efforts typically focus on enforcing resource-level authorization and minimizing exposure of decrypted credentials.
Pattern-based defensive measures may include:
- Applying consistent account ACL and user filters on every path that accesses or decrypts account data, including public link creation flows
- Ensuring that operations governed by feature flags (such as PUBLICLINK_CREATE) also perform fine-grained checks on the target resource
- Avoiding persistent storage of cleartext credentials in secondary tables; prefer derived, time-limited tokens that do not contain secrets
- Designing public link mechanisms so that link creation never expands a user's effective access beyond their existing account permissions
- Limiting the scope and lifetime of public links through expiration policies and revocation capabilities
How teams detect issues like this
Detection commonly relies on tracing authorization decisions and reviewing how resource identifiers are handled across code paths.
Useful approaches include:
- Static analysis rules that flag sensitive service calls (e.g., credential decryption or account loading) executed without adjacent authorization checks
- Code review checklists emphasizing verification that every endpoint honoring feature flags also enforces resource-level ACLs
- Logging and auditing of public link creation events, including the initiating user and target account, to spot patterns of cross-account access
- Policy enforcement via application firewalls or middleware that require explicit authorization before access to credential-related services
- Use of automated review tools to identify inconsistent use of AccountFilterUser or equivalent access-control constructs throughout the codebase

