Summary
OpenSignServer contains a broken object-level authorization flaw in the getDocument Parse cloud function. An unauthenticated remote attacker may retrieve complete contract records, including sender and signer personally identifiable information and a pre-signed document download URL, when the document's IsEnableOTP flag is unset, as in the default configuration.
Affected context
The issue occurs in OpenSignServer deployments through version 2.37.0 when the getDocument cloud function retrieves records with elevated database privileges but does not adequately enforce authorization for the requesting user. Risk is increased when documents retain the default configuration in which IsEnableOTP is unset, allowing the function to return records and pre-signed download URLs without an additional verification step.
Exploit preconditions
- Attack surface: The remotely accessible
getDocumentParse cloud function - Required access: No authentication may be required by the vulnerable request path
- Target condition: A contract or document record must be retrievable through the function
- Trigger point: The function processes a document lookup request
- Why exploitation is possible: The function uses
useMasterKey, bypassing object-level ACL checks, and can return the complete record when OTP enforcement is not enabled
Why this happens
The underlying defect is a failure to enforce authorization at the individual object level. The cloud function performs a privileged lookup that bypasses Parse ACL protections but does not independently verify whether the requester is entitled to access the selected contract. This behavior maps to CWE-639: Authorization Bypass Through User-Controlled Key, because a user-controlled object identifier can influence retrieval of a protected record without an effective ownership or access check.
Potential impact
- An unauthenticated attacker may read contract metadata and complete records
- Sender and signer personally identifiable information could be disclosed
- Pre-signed document URLs may allow access to protected documents
- Exposed records could support fraud, phishing, or targeted social engineering
- Confidentiality of contracts and related business information could be reduced
General mitigation guidance
Mitigation generally focuses on enforcing authorization independently of database privilege and reducing the data returned by document lookup functions.
Common defensive patterns include:
- Verify the requesting user's ownership, role, or explicit access relationship before retrieving each object
- Avoid using elevated database privileges unless the operation has a narrowly defined authorization path
- Treat object identifiers supplied by clients as untrusted references
- Require explicit verification for sensitive documents rather than relying on an unset or optional OTP flag
- Return only the minimum fields required for the requested operation
- Use short-lived, narrowly scoped document URLs and protect their creation with authorization checks
- Apply least-privilege service accounts and defense-in-depth access controls
How teams detect issues like this
Organizations can assess for this class of issue through:
- Static analysis and code review searches for privileged queries that accept client-controlled object identifiers
- Review of cloud functions that invoke
useMasterKeyor equivalent authorization-bypass mechanisms - Tests that attempt access to objects owned by another user or tenant
- API policy checks confirming authentication and object-level authorization before sensitive responses
- Monitoring for unusual unauthenticated document lookups, repeated identifier enumeration, and unexpected pre-signed URL issuance
- Automated security review tools that flag missing ownership checks and excessive response fields

